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.

Comments

droopy’s picture

I've just noticed that if I enable AdvAgg Compression javascript but disable Compress Inline JS on the JS compression tab, the parse error disappears.

mikeytown2’s picture

Can you give me the contents of that line # or the name of the file?

droopy’s picture

I 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.

mikeytown2’s picture

Status: Active » Needs work

hmmm so JSMin+ bombs on some of your inline script.

This is the inline scripts in your footer section Before JSMin+

var reftaggerHost = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cscript src='" + reftaggerHost + "bible.logos.com/jsapi/referencetagging.js' type='text/javascript'%3E%3C/script%3E"));
<!-- RefTagger from Logos. Visit http://www.logos.com/reftagger. -->
Logos.ReferenceTagging.lbsBibleVersion = "ESV";
Logos.ReferenceTagging.lbsLinksOpenNewWindow = true;
Logos.ReferenceTagging.lbsLibronixLinkIcon = "dark";
Logos.ReferenceTagging.lbsNoSearchTagNames = [ "h1", "h2", "h3" ];
Logos.ReferenceTagging.lbsNoSearchClassNames = [ "view-content" ];
Logos.ReferenceTagging.lbsCssOverride = true;
Logos.ReferenceTagging.tag();
if (typeof pageTracker != "undefined") {addthis_config.data_ga_tracker = pageTracker;}
if (typeof addthis != "undefined") {addthis.init();}



After JSMin+

var reftaggerHost=(("https:"==document.location.protocol)?"https://":"http://");document.write(unescape("%3Cscript src='"+reftaggerHost+"bible.logos.com/jsapi/referencetagging.js' type='text/javascript'%3E%3C/script%3E"))

if(typeof pageTracker!="undefined")addthis_config.data_ga_tracker=pageTracker
if(typeof addthis!="undefined")addthis.init()



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.

droopy’s picture

Thanks. Would that also account for the missing table errors?

Sadly there's no such thing as a perfect translation. We have to make do.

mikeytown2’s picture

missing table error should be taken care of by running update.php

mikeytown2’s picture

Status: Needs work » Fixed
StatusFileSize
new882 bytes

Committed this patch. This should fix this issue.

droopy’s picture

Thanks. 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jtsnow’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.29 KB

This 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.

mikeytown2’s picture

Status: Needs review » Fixed

Thanks, the patch has been committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.