• After moving our site to a new server (and switching to PHP 8), urls within css files are being re-written incorrectly when being minified. We have src: url("../folder/font.woff" but this is being re-written as src: url("content/themes/theme-name/folder/font.woff?x47828" instead of the correct src: url("/wp-content/themes/theme-name/folder/font.woff?x47828".

    WP 6.8, W3TC 2.8.8, Bitnami WordPress Multisite

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @larssg

    Thank you for reaching out and I am happy to help!
    As I can see you are using manual minify which means that the files are added manually to minify.
    So there is a chance that you added those files incorectly to css minify. Can you please share the screenshot of the Performance>Minify section, the CSS part so I can check the URL’s added?

    Thanks!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    -disregard-

    Thread Starter larssg

    (@larssg)

    Thanks, here’s a screenshot. I’ve reduced it to a single stylesheet for testing purposes. I’ve tried with both the absolute URL and with the relative URL. But to be clear, the stylesheet itself is being found and minified, it is the urls within the stylesheet that are incorrect after being minified (they are missing /wp- from the start of them).

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @larssg

    Thank you for your feedback.
    Can you pelase check and let me know if the same issue occurs if you use manual minify?
    Thanks!

    Thread Starter larssg

    (@larssg)

    Hi @vmarko, this is in manual minify mode (same result in automatic mode).

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @larssg

    Thank you for your feedback.
    Can you please check the Performance>Install section and check the rules there if they match the configration files on the server?

    Thanks!

    Thread Starter larssg

    (@larssg)

    Thanks @vmarko, I have verified the .htaccess rules are correct. But I don’t think this issue would be related to .htaccess as it isn’t a problem accessing the files, the problem is that the URL for the files in the minified CSS is clearly incorrect (starts with content instead of /wp-content).

    Thread Starter larssg

    (@larssg)

    Just to be clear, it isn’t an issue that the URL is being rewritten by the server and thus can’t be accessed, the issue is the URL is incorrect in the minified CSS directly (you can see this if you go to the site in question and search for ‘woff’ in the minified CSS).

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @larssg

    Thank you for your patience.
    We are testing this. To make sure we can replicate it, can you please confirm that this is a multisite?

    Thanks!

    Thread Starter larssg

    (@larssg)

    Thanks @vmarko, appreciate this. Yes, this is multisite.

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