I recently updated to rc6 from rc5 and began getting this message at the top of the page: Parse error: Missing operand in file '[inline]' on line 1
Visually it seems only that css is affected—fonts appear larger.
Disabling AdvAgg Compress Javascript fixed the problem.
I have also tried the current development version but the problem remains.
Debug output is attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | jsmin-exceptions-1186106-10.patch | 1.29 KB | jtsnow |
| #7 | advagg-1186106-7.patch | 882 bytes | mikeytown2 |
| advagg_debug.txt | 42.48 KB | droopy |
Comments
Comment #1
droopy commentedI've just noticed that if I enable AdvAgg Compression javascript but disable Compress Inline JS on the JS compression tab, the parse error disappears.
Comment #2
mikeytown2 commentedCan you give me the contents of that line # or the name of the file?
Comment #3
droopy commentedI have no idea what file is referred to. I can give you a bit more information though.
The parse error message disappears when Compress Inline JS is disabled.
But other problems remain. On various admin operations I get messages like this one, which was thrown up when I ran the master reset: user warning: Table xxxxxxxxxx.cache_advagg_js_compress_file' doesn't exist query: TRUNCATE TABLE cache_advagg_js_compress_file in /home/xxxxxxxx/public_html/xxxxxxx.net/includes/cache.inc on line 172..
I checked the database and there is no cache_advagg_js_compress_file table. I ran the update when I upgraded to rc6 and then the development version, though it looks like I upgraded from rc3 rather than rc5 as originally stated.
Comment #4
mikeytown2 commentedhmmm so JSMin+ bombs on some of your inline script.
This is the inline scripts in your footer section Before JSMin+
After JSMin+
Looks like JSMin+ is choking on the html comment; my guess is it should be a JavaScript comment as its inside the script tags. I'll add in the same checks I do for JS files as I do for inline compression. If the compression ratio is too good (no script left) then use the non compressed version. I'll get ya a fix by hopefully tomorrow, about to go to bed here. In the mean time leave inline compression off; as it's breaking your sites custom settings for logos.
PS I'm currently reading the Amplified. I do like reading the ESV in comparison to NKJV or the NASB.
Comment #5
droopy commentedThanks. Would that also account for the missing table errors?
Sadly there's no such thing as a perfect translation. We have to make do.
Comment #6
mikeytown2 commentedmissing table error should be taken care of by running update.php
Comment #7
mikeytown2 commentedCommitted this patch. This should fix this issue.
Comment #8
droopy commentedThanks. It seems to have fixed though enabling the js compression option initially produced the parse error message again. Then everything settled down. Clearing caches may have helped there.
Comment #10
jtsnow commentedThis problem is not fixed. If you look on line 219 of jsminplus.inc, you'll see that the library is printing errors directly. This means they are displayed to end users and can potentially break the layout of the page. It would be better if the library allowed the exceptions to bubble up to the code that is using the library. In this case, that function is
advagg_js_compress_jsminplus(). If you're open to modifying the library, that would allow advagg to gracefully handle the exception and log it to watchdog.If you prefer to leave the library in-tact so that future releases don't need to be patched, the error messages can be caught by buffering the output just before calling
JSMinPlus::minify(). I've attached a patch that does this and logs any errors to watchdog. I've wrapped this in a try-catch block so that if JSMinPlus decides to stop catching and printing its exceptions in the future, advagg should still work.Comment #11
mikeytown2 commentedThanks, the patch has been committed!