Debugging Javascript Minification Errors (in Liferay 6.2)
Solution 1:
Well, you solved the problem in another way - just some pointers should you (or someone else) run into this issue again:
Minifier reports Line number and Offset in these error messages, but they're related to the content that the minifier sees - e.g. not in your JSP, FTL or other file, but in whatever gets passed to the minifier.
The way to read the minifier log is:
- Line 607, column 21 as well as Line 608, column 45 have a problem
- In the following line, you see
JavaScript Minifier failed for_________ AUI().use('node', 'aui-base', 'aui-io-request', 'aui
which is the first part of the content that the minifier sees - locating this code, you might be able to identify which content gets passed to the minifier and count down the lines (well, jump down 607 lines from there)
Side issues: Agreeing with @Origineil that the startup time rather points to another issue that you have - it shouldn't be that much unless you deliberately have processes running at startup. E.g. if you're running a cluster and each machine keeps its own lucene index, you must reindex at startup. If you want to work around that, two indexes might not be what you're after. But it's only an example, and you didn't ask for this. I just wanted to add some pointers. I assume that you have tuned your JVM memory settings already and are not running with the default bundle's settings?
Solution 2:
I finally managed to solve the problem by:
copying the rendered (and unminified(!)) code between <script>
and </script>
and
paste it to JShint/lint/online minifier and re-check it there,
but I still wonder if there is some better way... (changing server properties from developer to production and back means restarting server few times at least and that takes about 300 seconds (only for restart) on my new(!) i7 vPro 64GB, SSD HDD workstation, so I try to avoid it as much as I can :)).
BTW: unminified code had some "deprecated" but simple ECMA methods that worked normally in JSFiddle and all latest browsers on my Win8.1...
Post a Comment for "Debugging Javascript Minification Errors (in Liferay 6.2)"