• Autoptimize blocks Google crawler. It took me about an hour with my hosting support to figure out what was going on. I have no Google scripts loaded on my site at all. But for some reason, Google crawler was returning a Server error 5xx and the issue only stopped after we deactivated autoptomize.

    Here are my full autoptimize settings: https://imgur.com/a/XM6tUaL I also use asset cleanup together with autopimize (making sure not to enable same settings in both) and I use Hummingbird purely for the browser caching control and nothing else.

    Here is a PHP error log we found:
    PHP Fatal error: Uncaught JSMin_UnterminatedStringException: JSMin: Unterminated String at byte 1067: “M32,1.8C15.3,1.8,1.8,15.3,1.8,32S15.3,62.3,32,62.3S62.3,48.7,62.3,32S48.7,1.8,32,1.8z M32,57.8 in /var/web/site/public_html/wp-content/plugins/autoptimize/classes/external/php/jsmin.php:212
    PHP Stacktrace:

    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
    • undefined
      /var/web/site/public_html/wp-content/plugins/autoptimize/classes/external/php/jsmin.php(150): JSMin->action(1)
      /var/web/site/public_html/wp-content/plugins/autoptimize/classes/external/php/jsmin.php(84): JSMin->min()
      /var/web/site/public_html/wp-content/plugins/autoptimize/classes/external/php/ao-minify-html.php(257): JSMin::minify(‘\n\tinternal function: AO_Minify_HTML->_removeScriptCB(Array)
      /var/web/site/public_html/wp-content/plugins/autoptimize/classes/external/php/ao-minify-html.php(105): preg_replace_callback(‘/(\s*)(…’)
      /var/web/site/public_html/wp-content/plugins/autoptimize/classes/external/php/ao-minify-html.php(47): AO_Minify_HTML->process()
      /var/web/site/public_html/wp-content/plugins/autoptimize/classes/autoptimizeHTML.php(105): AO_Minify_HTML::minify(‘…’, Array)
      /var/web/site/public_html/wp-content/plugins/autoptimize/classes/autoptimizeMain.php(592): autoptimizeHTML->minify()
      internal function: autoptimizeMain->end_buffering(‘…’, 9)
      /var/web/site/public_html/wp-includes/functions.php(5427): ob_end_flush()
      /var/web/site/public_html/wp-includes/class-wp-hook.php(324): wp_ob_end_flush_all(”)
      /var/web/site/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
      /var/web/site/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
      /var/web/site/public_html/wp-includes/load.php(1280): do_action(‘shutdown’)
      {main} thrown in /var/web/site/public_html/wp-content/plugins/autoptimize/classes/external/php/jsmin.php on line 212
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter awesiome

    (@awesiome)

    After some testing I realized the issue is only present when the HTML option “Enable this if you want inline JS or CSS to be minified as well.” is enabled

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    seems like the JS minifier is crashing on your inline JS which seems to have an “Unterminated String” @awesiome. you could try excluding the offending JS from being optimized or (ask the developer responsible for the JS to) ensure there are no unterminated strings?

    Thread Starter awesiome

    (@awesiome)

    The issue is caused by Elementor. Elementor has a performance feature called “Inline Font Icons” which renders icons as SVGs without loading the font awesome library and related CSS and fonts. When this feature is enabled it causes the autoptimize error which somehow then blocks Google crawler with a server error. I don’t know exactly what Elementor is doing wrong but at least I’ve narrowed down the exact feature. My guess is one or more SVG strings is improperly closed or has issues with escaping characters. The PHP error mentions “M32,1.8C15.3,1.8,1.8,15.3,1.8,32S15.3,62.3,32,62.3S62.3,48.7,62.3,32S48.7,1.8,32,1.8z M32,57.8…” which looks like a path for an SVG data string.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Interesting! And does that feature use (inline) JS?

    Thread Starter awesiome

    (@awesiome)

    I can’t answer definitively on that but I do not see any inline JS using the browser inspect tool

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I would be interested in looking at the HTML of your site, if not here you can also mail the URL to futtta-at-gmail-dot-com or copy/paste an anonymized version of the HTML to pastbin or something? ??

    Thread Starter awesiome

    (@awesiome)

    I’ll email you the website. It’s still in development so I’ll deactivate the maintenance page for a while after sending it to you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.