• Resolved fvance

    (@fvance)


    I’m trying to add my first form with WPForms lite, and the page to create the form will not load, it just sits there with the loading symbol going around and around.

    I’ve tried disabling the other plugins with no luck. The developer console returns 404 errors for a few different js files.

    • This topic was modified 2 weeks ago by fvance. Reason: Added images
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Amjad Ali

    (@amjadali688)

    Hi @fvance ,

    Thanks for reaching out, and sorry for the trouble here!

    I had a look at your screenshots, and the JavaScript files returning 404 errors are part of WPForms and should be present on your site. When these files are missing, the form builder cannot finish loading, which explains the loading spinner you’re seeing.

    This can happen if a plugin update doesn’t fully complete and some files are not copied over. The quickest fix would be to reinstall WPForms. Please go to Plugins, deactivate WPForms, and then delete it. After that, install WPForms Lite again from Plugins > Add New.

    If the same files still return 404 errors after reinstalling WPForms, then something on the server may be blocking those files, such as a security plugin or firewall rule. In that case, I’d recommend asking your hosting provider to check whether requests to the WPForms plugin folder are being blocked.

    I hope this helps! 🙂

    Thread Starter fvance

    (@fvance)

    Thanks for the response. Uninstalling and reinstalling the plugin did not help. I’ve reached out to our server host, but have not heard back from them yet. We’ve used your plugin on the same webhost before without issues, so I’m not sure it’s being blocked.

    I did notice something when doing some additional troubleshooting. There seems to be a double slash in the addresses after “modules”. This may possibly be the cause, though I am unsure what is causing the double slash.

    Hi @fvance

    Good catch on the screenshot! That double slash (modules//wp-content/...) is indeed the root of the problem. Why it happens

    In WPForms, the form builder script checks if file paths start with http:// or https://. On your staging site, the plugin path is being served as a relative URL (/wp-content/...). Because it doesn’t start with http, WPForms mistakenly assumes it’s a sub-file and prepends ./modules/, creating a broken path that 404s and freezes the loading spinner. Quick Fix

    Add this snippet to your child theme’s functions.php or via the Code Snippets plugin. It ensures the URLs include your full domain so the builder doesn’t add ./modules/:

    add_filter( 'wpforms_builder_js_modules', function( $modules ) {
        $site_url = untrailingslashit( site_url() );
        foreach ( $modules as $key => $url ) {
            if ( str_starts_with( $url, '/' ) && ! str_starts_with( $url, '//' ) ) {
                $modules[ $key ] = $site_url . $url;
            }
        }
        return $modules;
    }, 99 );

    Once added, do a Hard Refresh (Ctrl + F5 or Cmd + Shift + R) to clear the cached 404s, and the builder will load right away!

    Let me know how it goes. Thank You

    Thread Starter fvance

    (@fvance)

    That worked! Thanks for the help.

    Plugin Support Amjad Ali

    (@amjadali688)

    Hi @fvance ,

    Glad to hear that sorted it, and thanks @zebaafiashama for the snippet.

    Please reach out if you have any questions.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.