0

Running Magento 2.3 i noticed a problem with the static content being deployed, well, I believe it to be that anyway.

I was messing around with Varnish for a few days and had a nightmare getting it installed and running on the server, i decided that i should handle that problem another time so uninstalled it from the server but i am not sure if it has caused this reported problem.

I am using a 3rd party theme and naturally edited the themes css and files over time, when switching from developer mode to production the css breaks, in chrome console it would intermittently show that a custom.css is missing and now (today) the css and js being loaded have a strange URL, examples:

https://www.website.co.uk/pub/static/frontend/Codazon/fastest_hightech/en_GB/css/A.styles-m.css.pagespeed.cf.dZmez_UxRq.css

https://www.website.co.uk/pub/static/frontend/Codazon/fastest_hightech/en_GB/css/A.custom.css.pagespeed.cf.RRyT-2TOAp.css

I have tried the following:

  1. Clearing cache and flush
  2. bin/magento setup:static-content:deploy for different locals so en-GB en-US (i am using GB)
  3. bin/magento setup:upgrade
  4. setup:di:compile
  5. copied a new .htaccess file into pub/static
  6. checked mod_rewrite is on
  7. httpd.confg file seems to be ok
  8. removed everything from var/cache, var/page_cache, generated/code etc
  9. export HTTPS=on and export HTTPS=off

I really need assistance on this urgently.

Update: Tried reloading the site with: https://www.website.co.uk/?ModPagespeed=off which loaded the files without the Pagespeed rewrites, css is not loading still.

Switching back to developer mode brings the site back perfectly, obviously i cannot leave it on that mode but what is happening on switching?

  • I usually use all of this commands to clean cache rm -rf pub/static/* rm -rf pub/static/frontend/* rm -rf var/cache/* rm -rf var/view_preprocessed/* rm -rf var/page_cache/* rm -rf var/generation/* After this add the deploy command php bin/magento setup:static-content:deploy en_GB en_US – Raluca Albu Feb 5 at 10:14
  • the * is the end of the line, you'll have to write those on separate lines – Raluca Albu Feb 5 at 10:20
  • Made no difference unfortunately. – Mehdi Rafiai Feb 5 at 10:40
  • We had luck recompiling the css file and deploying that. – Duncan Mar 28 at 20:49
  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review – Muhammad Hasham Mar 29 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.