• Resolved b3nn0

    (@b3nn0)


    Updated to Version 1.8.8.3 today and on page refresh I now have a string of text appearing at the top of every page. If I deactivate WP Forms the message disappears. If I create a new form the message still remains. The message reads s follows:

    (function(){window.onpageshow=function(event){//Defined window wpforms means that a form exists on a page.// if so and back/forward button has been clicked,// force reload a page to prevent the submit button state stuck. if (typeof window.wpforms!==’undefined’&& event.persisted) {window.location.reload();}};}() );

    Any assistance is greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @b3nn0,

    Thanks for reaching out!

    When you get the chance, could you please try using the steps in WPBeginner’s detailed guide on troubleshooting WordPress to see if it helps resolve the issue?

    I hope this helps!

    Paula

    (@pollensteyn)

    I noticed this too today (don’t know if this is a recent issue, only been using wpforms for a few days). Some inline script and a bunch of css variables are displayed globally on every page. Styling is set to none, loading assets globally to off.

    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @pollensteyn and @b3nn0,

    I tried to reproduce the issue on my test site using PHP 8.2, the Storefront theme, and the PhastPress plugin with JavaScript minify options. But as you can see, I could not replicate the issue.

    When you get a chance, please share the details from?WPForms > Tools > System Info?(screenshot). With this, we will be able to try to reproduce the issue and provide further information.

    Thanks!

    Paula

    (@pollensteyn)

    Hi

    You should have a closer look at your test site, because I can see the exact same behaviour over there. In your inspector select the ‘<head>’ section and you’ll the css properties declared, as well as the inline script, which is generated in the Frontend.php file

    • This reply was modified 6 months, 3 weeks ago by Paula.
    Paula

    (@pollensteyn)

    And just to be clear, I meant the https://wpf-lite.instawp.xyz/ test site. Every page has the script (Frontend.php) and inline styles (coming from CssVars.php) added to the head section. The script is scouring the page looking for a form. For now I’ll manage with preg_replacing the head section, but this really shouldn’t be anywhere but on a page that actually contains a (wp)form. And regarding the inline css: if you have opted to have no styling at all this just shouldn’t be anywhere, period.

    Cheers

    Paula

    • This reply was modified 6 months, 3 weeks ago by Paula.
    Plugin Author Jared Atchison

    (@jaredatch)

    Hi @pollensteyn (and @b3nn0),

    Thanks for the report and all the details.

    We’ll get this fixed up in our next update.

    Sorry for the trouble but I really appreciate the bug report.

    Have a good one,

    Jared

    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @pollensteyn and @b3nn0,

    Thank you for all the details you provided! We have been able to identify the issue.

    For now, you can address the issue with this code snippet:

    add_filter( 'wpforms_frontend_maybe_reload_page_skip', '__return_true' );

    In case it helps, here is our tutorial featuring the most common ways to add custom code like this.

    For the most beginner-friendly option in that tutorial, I recommend using the WPCode plugin.

    I apologize for the inconvenience caused by this issue, and please know that it will be fixed in version 1.8.9.

    Thank you!

    Paula

    (@pollensteyn)

    Hi guys

    Thanks for the answers, glad I could be of any help. I was already looking at this piece of code, so it’s good to see a proper way of handling this script. For the inline css there has to come a way to properly enqueue/dequeue it, I think. For now I’ll stick to the blunt way of doing a string manipulation.

    Cheers

    Paula Dieterman

    Thread Starter b3nn0

    (@b3nn0)

    hi @rsouzaam

    Thanks for your replies, I have applied the code snippet and the problem has gone. I look forward to the updated version.

    @pollensteyn thank you for your input on this.

    Many thanks!

    Ben

    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @pollensteyn and @b3nn0,

    Thank you for your feedback!

    Since the issue can be addressed with the little code snippet I shared previously, I’m going to go ahead and close this thread for now. However, if you’d like us to assist further, please feel welcome to continue the conversation.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WP Forms line error being displayed on web page’ is closed to new replies.