magento-utils icon indicating copy to clipboard operation
magento-utils copied to clipboard

CleanCache causes incorrect paths to CSS/JS files

Open kohenkatz opened this issue 11 years ago • 3 comments

After running php cleanCache.php all, none of the CSS or JavaScript files on my Magento site were loading, both on the site itself and in the admin site.

Looking at the generated source code, I saw that the links looked something like this:

/var/www/skin/frontend/default/mystuff/css/bootstrap.css

They should properly look like this:

http://example.com/skin/frontend/default/mystuff/css/bootstrap.css

Following this StackOverflow answer got the site working again - just changing the two *merge* options and clearing the cache again did the trick.

Any idea why this happens? The original script had a comment describing the same issue, where it is suggested that there is a permissions problem. However, that is certainly not the case on my machine where all commands are run by the same user that owns the files (and the webserver runs as that same user too).

What else could be going on here?

kohenkatz avatar Dec 03 '14 06:12 kohenkatz

Just used this script and confirm that this bug still exist.

sayfulloev avatar Apr 16 '15 16:04 sayfulloev

2015-04-16 12-39-51 screenshot

This is how console reports all missing js and css and how backend looks like

sayfulloev avatar Apr 16 '15 16:04 sayfulloev

+1 and not a permissions problem

Also cleanDataCache wouldn't work so I swapped that with Mage::app()->getCacheInstance()->flush();

snez avatar Dec 05 '17 17:12 snez