WordPress.org

Forums

Autoptimize
[resolved] Fatal Error Code - Events Manager Update (23 posts)

  1. BigDogSF
    Member
    Posted 1 year ago #

    Hey Frank...got a new question. (BTW...the a.STRING(4 solution you previously offered fixed the error log issue! - thanks)

    I just updated the Events Manager plugin by Marcus Sykes to v 5.5.3. I'm getting this error code at the bottom of the front-end user form for adding events.

    Fatal error: Uncaught exception 'JSMin_UnterminatedStringException' with message 'JSMin: Unterminated String at byte 504663: "===a.STRING(4,5).toUpperCase()?r():!1):!1' in /home/collecto/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php:203 Stack trace: #0 /home/collecto/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php(145): JSMin->action(1) #1 /home/collecto/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php(84): JSMin->min() #2 /home/collecto/public_html/wp-content/plugins/autoptimize/classes/autoptimizeScripts.php(175): JSMin::minify('?try{jQuery.noC...') #3 /home/collecto/public_html/wp-content/plugins/autoptimize/autoptimize.php(249): autoptimizeScripts->minify() #4 [internal function]: autoptimize_end_buffering('<!DOCTYPE html>...', 9) #5 /home/collecto/public_html/wp-content/plugins/wp-external-links/includes/class-wp-external-links.php(125): ob_end_flush() #6 [internal function]: WP_External_Links->callba in /home/collecto/public_html/wp-content/plugins/autoptimize/classes/external/php/minify-2.1.7-jsmin.php on line 203

    If I turn off the Javascript function in Autoptimize the message disappears. Any thoughts?

    Regards,
    William

    https://wordpress.org/plugins/autoptimize/

  2. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    This probably is due to an error in the javascript of Event Manager, the Events Manager devs might be able to assist in fixing this?

  3. BigDogSF
    Member
    Posted 1 year ago #

    Ok..thanks for verifying this.

    Regards,
    Will

  4. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    NP. I would, for now, just exclude Event Manager's JavaScript.

  5. BigDogSF
    Member
    Posted 1 year ago #

    I've been trying to figure out what to put in the exclude for events manager...but nothing I have tried worked...mmm...

  6. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    "events-manager"?

  7. brashell
    Member
    Posted 1 year ago #

    I am experiencing this issue as well, but I don't have that plugin. I also am experiencing a high amount of latency, I am also unable to minify and compress js in the footer or anywhere when the Look for scripts only in <head> is enabled. Force JavaScript in <head> when unchecked also causes issues. Ideas?

  8. brashell
    Member
    Posted 1 year ago #

    Look for scripts only in head is what appears to be causing the problem, when it isn't checked, it causes the error to occur.

  9. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Brashell;
    Some questions/ feedback;

    • are you getting the exact same error that BigDogSF is seeing?
    • It might not be optimal form a performance point of view, but a lot of jquery-based themes need "force js in head" and "look only in head. You can, alternatively, disable "look only in head" but you'll have to search for the JS that is causing problems and exclude that, which might take some trial and error.
    • latency typically occurs if you don't have a page cache plugin (e.g. wp super cache).

    hope this helps,
    frank

  10. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    Ah, missed your 2nd remark. This means that one of the javascripts outside of head has a bug in it which causes the JS minifier to throw an error.

  11. brashell
    Member
    Posted 1 year ago #

    Just out of curiosity, are you declaring $content only here? Because it might make sense why it only works when just head is checked.

    if($options['justhead'] == true)
    		{
    			$content = explode('</head>',$this->content,2);
    			$this->content = $content[0].'</head>';
    			$this->restofcontent = $content[1];
    		}

    Or am I missing it?

  12. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    you're missing it; $content is available before (and is used in the explode), but it is changed (the head is chopped off ;-) ) if justhead==true.

  13. brashell
    Member
    Posted 1 year ago #

    plupload.full.min.js Is the file causing the problem I determined, by adding it to the whitelist it all works, but at the same time, it adds a ton of latency.

  14. brashell
    Member
    Posted 1 year ago #

    Question, is there a way to split it up to multiple files?

  15. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    1. where do you see the latency brashell; loading of the base page (HTML), the loading of the aggregated JS (CSS), or loading the excluded files? and when talking latency, do you mean "time to first byte" or the actual download?
    2. splitting the aggregated js (css) file up is not possible i'm afraid.
    3. plupload.full.min.js is a great catch, thanks for that!! given it's popularity I might add it to the default JS exclusion list.

  16. brashell
    Member
    Posted 1 year ago #

    Time to first byte, and all files including base load, one of the pages has over 1MB from a single file then because the system won't split it up not sure what to do.

  17. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    Don't understand Brashell, do you have a URL where I could have a look?

  18. brashell
    Member
    Posted 1 year ago #

    Do you have a contact form or email? I don't want to post the link here. Thanks.

  19. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    Sure; futtta-at-gmail-dot-com

  20. BigDogSF
    Member
    Posted 1 year ago #

    Hi Frank....I already tried "events-manager", but no go.

    I want to clarify. The fatal error code only shows up on the page where I have a front-end form for events manager.

    All of the other events manager pages are clean...so this has to be something to do with the events-form.

    I tried "event(s)-form" but got no results.

    Just tried "plupload.full.min.js" and the fatal error issue resolves.

    So, I just got an answer back from the Events Manager developer. He states that the issue is not caused by the Events Manager plugin, that it is other plugins causing this issue. Any thoughts?

    Regards,
    Will

  21. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    could very well be Will. the next minor release will exclude plupload.full.min.js by default and i'm thinking about a more general solution to already minified js for a next major version.

  22. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    The test-version of 1.8.5, which I just committed to the trunk-build, excludes plupload.full.min.js from being aggregated. It would be great if you could download & test to confirm this does work?

  23. BigDogSF
    Member
    Posted 1 year ago #

    Hi Frank - Yes the new 1.8.5 version works as promised. You are good to go.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Autoptimize
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.