cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when JS files merged

Problem when JS files merged

In an effort to improve performance, we enabled the merge JS/CSS in our back end.   Things on the front end appear well and good, but what we discovered was the the Manage Categories page was not displaying the category information.  The categories were there in the tree on the left, just nothing in the main panel.  This was discovered on out UAT/Production CentOS systems as well as my local dev install on Win7/XAMPP.   One thing I've noticed is that there are two copies of jQuery being loaded, but I've seen this before without and everything is fine without the merging.   Any idea why the merging would cause this symptom?   Is there something else the merge function does besides the obvious?   As soon as we disabled the merge everything displayed just fine.   This is on Magento Enterprise 1.14.0.1 with all the patches applied.  

 

 

1 REPLY 1

Re: Problem when JS files merged

What merge does is it just concatenates all those JS files which is all fine and dandy when there're no JS errors, but may break many previously working script when not. Whenever there's syntax error or something like that, interpreter will stop further script processing.

 

Lets say you have 10 scripts. 9 of them works just fine, but 1 -- not so much. Lets say you merge those scripts and the bad one happens to be the first -- it pretty much means that 9 otherwise fine scripts will stop working as well. Ain't that great?

 

So find you broken script and fix it. Then merge everything again and you should be good.

Tanel Raja