I have recently migrated a Magento website which had been using merge_css_files successfully.
On the new server, however, I cannot get it to work and would very much appreciate any advice on the matter. The system will create the CSS files in media/css
but they are always blank (unpopulated). I suspect that this might be something to do with the server itself as it worked previously on the old server.
I have already toggled Merge CSS on and off, flushed the caches multiple times, deleted the files from the media/css
folder, updated all file and folder permissions, checked the ownership in FTP.
Perhaps you have experienced the same or could advise on a possible solution?
Best Answer
FWIW, that statement says two different things. You did do a great debugging thing by checking with a vanilla install.
The only thing you can do is debug
Mage_Core_Model_Design_Package::_mergeFiles()
and/orMage_Core_Helper_Data::mergeFiles()
. I believe the latter of these is where execution is breaking out.Also, ensure that
display_errors
and developer mode are enabled (I would just do this inindex.php
temporarily given the environment issues). Also ensure to check error logs invar/log/
. You may want to verify that session & cache files are able to write to thevar
directory as well.Edit:
Before you debug, confirm that the site looks as you would expect with merging disabled.
Since you are using FTP you want to keep debug iterations to a minimum. So, you should use Magento's native logging:
You'll want to sprinkle this throughout the methods in question. I'd start with the
mergeFiles()
method from the core helper:If you do not see
var/log/merge.log
being created, first drop that call in at the very end ofindex.php
; if you still don't see it then there is something amiss with your environment and you will need your host to help. If you do see it but it contains no content from the helper, then you need to step back to the_mergeFiles()
call in the design package model. Have fun!