Title: Invalid CSS Url
Last modified: May 23, 2023

---

# Invalid CSS Url

 *  Resolved [misterwindsurfer](https://wordpress.org/support/users/misterwindsurfer/)
 * (@misterwindsurfer)
 * [3 years ago](https://wordpress.org/support/topic/invalid-css-url/)
 * using the Forminator plugin, after migrating from JotForm – it generates an invalid
   URL for the CSS (i.e. without a slash).
 * e.g. [http://www.trentwindsurfingclub.co.uk7441_5be9986e57654253e905a2e2db739692](https://www.trentwindsurfingclub.co.uk7441_5be9986e57654253e905a2e2db739692/css/style-7441.css?ver=1684751281)
 * It should be:
 * [https://www.trentwindsurfingclub.co.uk/7441_5be9986e57654253e905a2e2db739692/css/style-7441.css?ver=1684751281](https://www.trentwindsurfingclub.co.uk/7441_5be9986e57654253e905a2e2db739692/css/style-7441.css?ver=1684751281)
 * The form works fine in preview.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-css-url%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Saurabh – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support7/)
 * (@wpmudev-support7)
 * [3 years ago](https://wordpress.org/support/topic/invalid-css-url/#post-16762118)
 * Hi [@misterwindsurfer](https://wordpress.org/support/users/misterwindsurfer/)
 * Hope you are doing fine
 * If the form is working fine in preview, the issue could be caused by a cache 
   setting in the site. Could you please try the following?
    1. Clear all the site cache (from plugin/ hosting admin area or any other external
       proxy service, like Cloudflare) and test if the css urls are re-generated correctly.
    2. If you still have issues after clearing the cache. Try deactivating any cache
       plugins in the site and verify again.
 * Please let us know the results so we can provide further assistance.
 * Kind regards
 * Luis
 *  Thread Starter [misterwindsurfer](https://wordpress.org/support/users/misterwindsurfer/)
 * (@misterwindsurfer)
 * [3 years ago](https://wordpress.org/support/topic/invalid-css-url/#post-16763643)
 * Tried those things, including removing the Lite Speed Cache plugin, but the problem
   still persists. The URL being generated for the CSS is invalid. It’s missing 
   a “/” between the hostname and the rest of the URL.
 * Also tried switching the form to Ajax loading and enable the disable cache option
   on the form.
 * Still no luck.
    -  This reply was modified 3 years ago by [misterwindsurfer](https://wordpress.org/support/users/misterwindsurfer/).
 *  Plugin Support [Laura – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support8/)
 * (@wpmudev-support8)
 * [3 years ago](https://wordpress.org/support/topic/invalid-css-url/#post-16765011)
 * Hi [@misterwindsurfer](https://wordpress.org/support/users/misterwindsurfer/)
 * Thanks for response!
 * I looked into it closer and I think I might have some idea on the cause of this.
   It may actually be a bug (not discovered earlier) but I’m not yet quite sure 
   so may I ask you for a bit more help with this?
 * 1. Please go to the “Forminator -> Settings -> Data” page and look at the “File
   Upload Storage” option setting.
 * – if it’s set to “Custom”, let me know what path is defined there (feel free 
   to “mask” any sensitive data there if needed) and then try switching it to “Default”
   instead of “Custom” and save settings
 * – if it’s already set to “Default” – switch it to custom, save settings, and 
   switch back to “Default” and save settings again
 * After that, edit you form in question and do some (any, it can be e.g. adding
   and removing some field) change there and update the form.
 * Finally, clear all cache again and test if the issue is still happening.
 * 2. If it is still happening, would you be able to do a bit more complex test (
   I’m asking because I still can’t fully replicate the issue)? It would go as follows:
 * a) you would need to edit one of the Forminator files temporarily
 * – the file is /wp-content/plugins/forminator/library/helpers/helper-fields.php
   –
   and you’d need to replace this code (line 2391)
 * `$dir = wp_upload_dir();`
 * with this
 *     ```
       error_log( "### FORMINATOR CSS DEBUG ### ");
       error_log( print_r( $dir, true ) );
       error_log( "### FORMINATOR CSS DEBUG END ### ");
       $dir = wp_upload_dir();
       ```
   
 * b) once change is done, enable debugging on the site by adding following lines
   to the “wp-config.php” file of the site, right above “/* That’s all, stop editing*/”:
 *     ```
       define( 'WP_DEBUG', true );
       define( 'WP_DEBUG_LOG', true );
       define( 'WP_DEBUG_DISPLAY', false );
       ```
   
 * c) then clear all caches and load page with the form a few times
 * d) after that look into the “/wp-content/” folder and you should see the “debug.
   log” file there. In that file look for lines between
 * _### FORMINATOR CSS DEBUG ###_
 * and
 * _### FORMINATOR CSS DEBUG END ###_
 * and share them with us (again, if there’s any sensitive data, mask it).
 * Once that’s done please undo both changes (points a and b).
 * I would appreciate such help a lot!
 * Best regards,
    Adam
 *  Thread Starter [misterwindsurfer](https://wordpress.org/support/users/misterwindsurfer/)
 * (@misterwindsurfer)
 * [3 years ago](https://wordpress.org/support/topic/invalid-css-url/#post-16765281)
 * Hi, I tried all that and could not get any debug messages out. However, whilst
   trying to debug why I was not getting debug messages out, I noticed that the 
   the media upload path was an absolute value rather than the default. I changed
   back to the default and this now works.
 * Thank you for you help.

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

The topic ‘Invalid CSS Url’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [invalid](https://wordpress.org/support/topic-tag/invalid/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * 4 replies
 * 3 participants
 * Last reply from: [misterwindsurfer](https://wordpress.org/support/users/misterwindsurfer/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/invalid-css-url/#post-16765281)
 * Status: resolved