• Resolved kb959fl

    (@kb959fl)


    I just installed the plugin and was able to run the bulk optimize on my media library successfully. However, when I clicked the “Scan and Optimize” button for the “Optimize Everything Else”, it basically gave me the spinning circle icon and stayed that way for over 10 hours. Does it normally take that long to complete or did something go wrong? Thanks.

    https://ww.wp.xz.cn/plugins/ewww-image-optimizer/

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Nope, it should only spin for a little while, and then start showing you a progress bar, very similar to the media library optimization.

    Often times, specific files will cause some of the filetype/mimetype functions to spring a sudden memory leak, and that will cause it to get ‘stuck’. It’s a little bit tricky to troubleshoot, but here’s how to do it:

    In the file ewww-image-optimizer.php, you should see this function at around line 978: ewww_image_optimizer_mimetype().

    A couple lines into the function, you’ll see a debugging line that says something like “testing mimetype: $path”.
    Directly below that line, add this:

    ewww_image_optimizer_debug_log();

    Then, turn on debugging and run the Scan & Optimize. Then, please post the last 25-50 lines of output from ewww-image-optimizer/debug.log (via pastebin if necessary).

    Thread Starter kb959fl

    (@kb959fl)

    nosilver4u – Thanks for your help. Here is the debug file:

    http://pastebin.com/fiRYFnH1

    Plugin Author nosilver4u

    (@nosilver4u)

    Is that everything that was in the debug.log file, or was that from the settings page?

    Thread Starter kb959fl

    (@kb959fl)

    Yes, that was the entire debug.log file. I clicked “Scan & Optimize” and then let it run for 3-4 minutes and then copy/pasted the content from that file.

    Thread Starter kb959fl

    (@kb959fl)

    Should I clear out the debug file and run it again?

    Plugin Author nosilver4u

    (@nosilver4u)

    Yes please, you can just delete the file completely, it will get recreated when you run it again. And make sure you added the ‘ewww_image_optimizer_debug_log()’ function right under the line that says ‘testing mimetype…’ in common.php otherwise we won’t get any useful output. I suppose we still might not if the problem is somewhere else, but that’s our starting point.

    Thread Starter kb959fl

    (@kb959fl)

    Is the file to be edited ewww-image-optimizer.php or common.php?

    Plugin Author nosilver4u

    (@nosilver4u)

    sorry, I misspoke in that last post, it is ewww-image-optimizer.php

    Thread Starter kb959fl

    (@kb959fl)

    Cool, I will give it another shot. On a sidenote, have you heard of any issues with images not displaying after the optimizer is installed and ran? My site in Safari (iMac and iPhone) is not displaying thumbnails and slider images. Either the slider images show up and not the thumbnails (posts) or it’s the other way around. I checked Chrome/Safari and those browsers seems to be working fine.

    Thread Starter kb959fl

    (@kb959fl)

    I figured it out. Looks like it’s an issue with my caching plugin.

    Plugin Author nosilver4u

    (@nosilver4u)

    Glad you found the glitch, making a site fast and awesome can be a bit tricky at times, but if you stick with it, you can achieve some pretty impressive results.
    Let me know what you get when you run the Scan & Optimize again.

    Thread Starter kb959fl

    (@kb959fl)

    Okay, I removed the debug file and ran it again. Here is the contents of the new debug file:

    http://pastebin.com/RbVSQQf3

    Here is the code from the “ewww-image-optimizer.php” file after making the changes:

    function ewww_image_optimizer_mimetype($path, $case) {
    	global $ewww_debug;
    	$ewww_debug .= "<b>ewww_image_optimizer_mimetype()</b><br>";
    	$ewww_debug .= "testing mimetype: $path <br>";
    	ewww_image_optimizer_debug_log();
    	if ( $case == 'i' && preg_match( '/^RIFF.+WEBPVP8/', file_get_contents( $path, NULL, NULL, 0, 16 ) ) ) {
    			return 'image/webp';
    Plugin Author nosilver4u

    (@nosilver4u)

    Well, I think I was looking for the wrong culprit here. I think it might be another plugin interfering with the ajax responses. If you know your way around a javascript console (either the one in Chrome, Firefox, or even better the Firebug extension for Firefox), you can watch the ajax queries, and then expand them to see the responses.

    Open the console, and then run the Scan & Optimize to see what happens, and what the response is. If you get stuck, send me a login via https://ewww.io/contact-us/ and I’ll take a look myself.

    If you do find something (or even if you don’t and it all looks normal), a screenshot of the console output would be helpful.

    Plugin Author nosilver4u

    (@nosilver4u)

    Did you ever find out anything?

    Thread Starter kb959fl

    (@kb959fl)

    Sorry for the delay. Here is the output from the javascript console in chrome:

    Uncaught SyntaxError: Unexpected token
    m.parseJSON @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery…:4
    e.parseJSON @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery…:8
    (anonymous function) @ eio.js?ver=4.2.3:177
    j @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery…:2
    k.fireWith @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery…:2
    x @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery…:4
    b @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-widget,jquery-ui-core,jquery…:4
Viewing 15 replies - 1 through 15 (of 21 total)

The topic ‘Issues with Optimize Everything Else’ is closed to new replies.