• Resolved grevillea859

    (@grevillea859)


    Hi,

    I am seeing the following message on all pages where I have a form. I have WPForms Lite ver 1.8.9.2.

    “Heads up! WPForms has detected an issue with JavaScript on this page. JavaScript is required for this form to work properly, so this form may not work as expected.”

    The form still works in that messages, emails come through without further issues as far as I can see.

    What might be the “issue” then that the message is referring to? Can I simply ignore it?

    I have LiteSpeed Cache but javascript is not minified.

    Thank you for your time and I look forward to your reply.

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

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

    (@rsouzaam)

    Hi @grevillea859,

    Thanks for reaching out, and I’m sorry to hear about this issue in your forms!

    I tried to reproduce the issue, but when I attempted to submit the form on the page you shared, Wordfence blocked me – screenshot.

    I also tried to reproduce the issue on my dev site, but I had no success.

    With this, I’d ask you to try to address the issue by adjusting the LiteSpeed Cache settings on your site by following our guide: Configuring Optimization Settings for WPForms in LiteSpeed Cache.

    After this, please purge LiteSpeed Cache’s caching, and here is a screenshot from my dev site as an example on how to do this.

    In case the issue persists after the adjustments above, please share screenshots from the settings in the LiteSpeed Cache plugin on your site. This way, we can try to reproduce the issue and provide further information.

    Thanks!

    Thread Starter grevillea859

    (@grevillea859)

    Hi @rsouzaam,

    Thank you for replying. I am sorry you were blocked. I must have inadvertently blocked your ip or something and will need to look into that.

    Thank for providing helpful links. I have followed those instructions and cleared the cache but still get the same message.

    When I ran a Google Page Speed test I got these messages logged to the console for each of the 6 urls below: “failed to load resource, the server responded with a 403 forbidden error”.

    /wpforms-lite/assets/js/frontend/wpforms.min.js?ver=1.8.9.2
    /wpforms-lite/assets/lib/mailcheck.min.js?ver=1.1.2
    /wpforms-lite/assets/lib/punycode.min.js?ver=1.0.0
    /wpforms-lite/assets/js/frontend/wpforms-modern.min.js?ver=1.8.9.2
    /wpforms-lite/assets/lib/jquery.validate.min.js?ver=1.20.0
    /wpforms-lite/assets/js/share/utils.min.js?ver=1.8.9.2

    In addition for each url above I saw this:

    “Refused to execute script from ‘mysite/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms-modern.min.js?ver=1.8.9.2’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.”

    I have no idea what the above means. But before sending screenshots I was thinking these might be an issue for my host, at server level? Whether the above urls need to be whitelisted?

    I look forward to your comments,

    Thank you again.




    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @grevillea859,

    Thanks for sharing all those details!

    Looking at these alerts:

    • “failed to load resource, the server responded with a 403 forbidden error”.
    • “Refused to execute script from ‘mysite/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms-modern.min.js?ver=1.8.9.2’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.”

    It looks like something on your server is blocking our JavaScript files, and those files are required to submit a form. This is likely the cause of the alert: “Heads up! WPForms has detected an issue with JavaScript on this page. JavaScript is required for this form to work properly, so this form may not work as expected.”

    I recommend reaching out to your hosting provider’s support team and sharing these details with them. The issue might be related to:

    • The folder structure on your server.
    • The Content-Type settings.
    • Security settings, like the server’s mod_security configuration.

    Your hosting provider should be able to help you get this sorted out.

    I hope this helps!

    Thread Starter grevillea859

    (@grevillea859)

    Hi @rsouzaam,

    Thank you for replying.

    As well as LiteSpeed Cache I have an optimizing plugin: Perfmatters. When I removed some js scripts from being deferred the WP Forms message disappeared so now have resolved that.

    But the 403 forbidden and blocking alerts remained. It seems there is a conflict with a security plugin is involved and I am looking at that.

    However all of the scripts above are render-blocking which I used to do with defer. How can stop these from blocking the render?

    Thank you

    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @grevillea859,

    Thanks for letting me know!

    Since Perfmatters is a paid plugin, I cannot check if some settings in this plugin might be related to the issue you’re facing.

    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!

    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @grevillea859,

    To add to my previous message, we have been chasing down the issue further internally and while we cannot reproduce the issue, I wanted to mention that based on our experience, optimization plugins change the order of loading scripts and this has been known to cause the issue you are seeing.

    Please know that I was able to submit your form, and I did not see any alerts in the console. For your reference, I recorded this screencast.

    Regarding this alert: “Heads up! WPForms has detected an issue with JavaScript on this page. JavaScript is required for this form to work properly, so this form may not work as expected.”

    Please note this alert is only displayed for Administrators.

    If you continue seeing it but do not have issues submitting the form, you can hide that alert with this little code snippet:

    add_filter( 'wpforms_frontend_missing_assets_error_js_disable', '__return_true' );

    In case it helps, here’s our tutorial with the most common ways to add custom code like this.

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

    I hope this can help!

    Thread Starter grevillea859

    (@grevillea859)

    Hi @rsouzaam,

    Thanks so much for replying, for your attempts to reproduce the problem, helpful advice and links. Thank you for mentioning that about optimization plugins re-ordering scripts, it hadn’t occurred to me but now makes sense.

    Thank you also for testing the form – it is great to know that it works! I have not had issues submitting the form with the alerts present but seeing them made me wonder if something was amiss all the same. Thank you for providing the code snippet, much appreciated. I have now added it to my functions.php file in my child theme and the alerts have gone. And the form works!

    I was able to fix an aspect of the security plugin which was causing the 403 forbidden errors. The wpforms scripts above I have delayed and that seemed to clear up the blocking effect.

    So everything is working fine now, many thanks for your time and prompt replies – and this closes this ticket.

    Plugin Support Ralden Souza

    (@rsouzaam)

    Hi @grevillea859,

    Great to hear that everything is working fine, and I’m glad we could help here.

    If you’d like more help with using WPForms Lite, please feel free to reach out.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.