• Resolved jshare

    (@jshare)


    With WP_DEBUG enabled, I see this in the Image Optimizer column for each image:

    Notice: Use of undefined constant EWWW_IMAGE_OPTIMIZER_PNGOUT – assumed ‘EWWW_IMAGE_OPTIMIZER_PNGOUT’ in /var/www/mydomain.com/html/wp-content/plugins/ewww-image-optimizer/common.php on line 2393

    Happens regardless of whether pngout is enabled

    https://wordpress.org/plugins/ewww-image-optimizer/

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

    (@nosilver4u)

    Ok, I need a little info to troubleshoot. In the file common.php there is a line that looks like this:

    //add_action( 'contextual_help', 'wptuts_screen_help', 10, 3 );

    Remove the two slashes, and then go back to where you saw the error. At the top right corner, there is a Help pull-down. Click that, and then go to the Screen Information section, and copy and paste that information here.

    Thread Starter jshare

    (@jshare)

    Still happening after the upgrade to 2.4.4:

    Screen variables
        Screen id : upload
        Screen base : upload
        Parent base : upload
        Parent file : upload.php
        Hook suffix : upload.php
    
        Hooks
        load-upload.php
        admin_print_styles-upload.php
        admin_print_scripts-upload.php
        admin_head-upload.php
        admin_footer-upload.php
    Plugin Author nosilver4u

    (@nosilver4u)

    Can you please post the debugging output from the EWWW IO settings page?

    Thread Starter jshare

    (@jshare)

    Still happening in 2.4.5. Here’s the debug log

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, I’ve replicated all your settings, and still can’t replicate the error.
    Can you post a screenshot of the page with the error (so I can make sure I’m looking in the right place)?

    Then, in the ewww-image-optimizer/ folder you’ll see a file named debug.log. Delete it, and then load the page with the error once (make sure you don’t browse anywhere else on your site after deleting the debug.log). Copy and paste the new debug.log (should be similar to what you posted earlier), and then you can turn EWWW debugging back off.

    It’s important that the only page you load is the one with the error, so we don’t pollute the debug.log with other output from other pages.

    Plugin Author nosilver4u

    (@nosilver4u)

    nevermind about the debug.log, I just realized it doesn’t get generated from the Media Library, so it will just be an empty file… But a screenshot of the Media Library where you’re seeing the error might still be useful.

    Thread Starter jshare

    (@jshare)

    Plugin Author nosilver4u

    (@nosilver4u)

    The only thing I can think of is that perhaps another plugin is removing hooks from load-upload.php or something similar after EWWW has hooked onto that, since you are seeing the undefined constant on all images, it would indicate that the ‘tool_init’ function is not running at all. At first I thought it was just a PNGOUT issue, but you’ve shown that it is not limited to PNGOUT.

    So… can you see what happens if you disable all plugins except EWWW?
    If that fixes it, then enable one at a time until it breaks again.

    Thread Starter jshare

    (@jshare)

    Found it.

    It’s a conflict with the Enhanced Media Library plugin. Deactivate that, and the notice goes away

    Plugin Author nosilver4u

    (@nosilver4u)

    Perfect, I’ll install it on my dev server and see if I can find a fix.

    Plugin Author nosilver4u

    (@nosilver4u)

    EML just happens to use the exact same media hook as EWWW IO. The problem is that EML takes complete control of the flow from there on out, and exits when it is done, which means EWWW never runs the tool_init function (or if it does, it happens AFTER we need it to).
    Simple fix, just run tool_init at priority 9, so it goes before EML loads.

    Fixed in dev: https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip

    Thread Starter jshare

    (@jshare)

    After uploading your dev version, the warning is now this:

    Notice: Use of undefined constant EWWW_IMAGE_OPTIMIZER_JPEGTRAN - assumed 'EWWW_IMAGE_OPTIMIZER_JPEGTRAN' in /var/www/mydomain.com/html/wp-content/plugins/ewww-image-optimizer/common.php on line 2413

    Plugin Author nosilver4u

    (@nosilver4u)

    Strange… grab a fresh copy, and make sure the version number says 2.4.5.1

    Thread Starter jshare

    (@jshare)

    I just redownloaded the dev version, but it’s still tagged 2.4.5

    Plugin Author nosilver4u

    (@nosilver4u)

    Let’s make sure I’m giving you the right link then: https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip

    You have to deactivate, and delete EWWW IO from your site, and then upload the new one in place.

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘WP_DEBUG warnings’ is closed to new replies.