[magento-devel] Issues with merged JS/CSS in Magento 1.4

137 views
Skip to first unread message

Unirgy

unread,
Apr 21, 2010, 7:49:21 PM4/21/10
to Magento Development List
This question was raised by my client today:

http://stackoverflow.com/questions/2141873/why-is-magento-1-4-including-javascript-files-by-filesystem-path

The issue is that after the files are merged and Magento checks
whether the cache is still valid, it checks for files that do not
exist, so filemtime() throws warning which is processed as exception,
and the whole thing goes awry.

To resolve it:

Edit app/code/core/Mage/Core/Helper/Data.php, around line 631:

REPLACE:

if (filemtime($file) > $targetMtime) {

WITH:

if (file_exists($file) && @filemtime($file) > $targetMtime) {

--
You received this message because you are subscribed to the Google Groups "Magento Development List" group.
To post to this group, send email to magent...@googlegroups.com.
To unsubscribe from this group, send email to magento-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/magento-devel?hl=en.

Unirgy

unread,
Apr 21, 2010, 8:07:57 PM4/21/10
to Magento Development List
I understand that this is a temporary solution, until there's some
kind of indication of which files were actually used in the merged
version.

On Apr 21, 4:49 pm, Unirgy <uni...@gmail.com> wrote:
> This question was raised by my client today:
>
> http://stackoverflow.com/questions/2141873/why-is-magento-1-4-includi...
Reply all
Reply to author
Forward
0 new messages