Title: WP_DEBUG warnings
Last modified: August 30, 2016

---

# WP_DEBUG warnings

 *  Resolved [jshare](https://wordpress.org/support/users/jshare/)
 * (@jshare)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/)
 * 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/](https://wordpress.org/plugins/ewww-image-optimizer/)

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

1 [2](https://wordpress.org/support/topic/wp_debug-warnings-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wp_debug-warnings-1/page/2/?output_format=md)

 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232897)
 * 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](https://wordpress.org/support/users/jshare/)
 * (@jshare)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232956)
 * 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](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232969)
 * Can you please post the debugging output from the EWWW IO settings page?
 *  Thread Starter [jshare](https://wordpress.org/support/users/jshare/)
 * (@jshare)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232972)
 * Still happening in 2.4.5. Here’s the [debug log](https://www.dropbox.com/s/7jdsdxmlolik1vw/ewww-debug-log.txt?dl=0)
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232973)
 * 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](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232974)
 * 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](https://wordpress.org/support/users/jshare/)
 * (@jshare)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232975)
 * Screenshot:
 * [https://www.dropbox.com/s/rvsjogk1it0875v/ewww-debug-ss.png?dl=0](https://www.dropbox.com/s/rvsjogk1it0875v/ewww-debug-ss.png?dl=0)
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232986)
 * 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](https://wordpress.org/support/users/jshare/)
 * (@jshare)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232990)
 * Found it.
 * It’s a conflict with the [Enhanced Media Library](https://wordpress.org/plugins/enhanced-media-library/)
   plugin. Deactivate that, and the notice goes away
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232996)
 * Perfect, I’ll install it on my dev server and see if I can find a fix.
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232997)
 * 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](https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip)
 *  Thread Starter [jshare](https://wordpress.org/support/users/jshare/)
 * (@jshare)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6232998)
 * 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](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6233006)
 * Strange… grab a fresh copy, and make sure the version number says 2.4.5.1
 *  Thread Starter [jshare](https://wordpress.org/support/users/jshare/)
 * (@jshare)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6233007)
 * I just redownloaded the dev version, but it’s still tagged 2.4.5
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/#post-6233010)
 * Let’s make sure I’m giving you the right link then: [https://downloads.wordpress.org/plugin/ewww-image-optimizer.zip](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)

1 [2](https://wordpress.org/support/topic/wp_debug-warnings-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wp_debug-warnings-1/page/2/?output_format=md)

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

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [jshare](https://wordpress.org/support/users/jshare/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/wp_debug-warnings-1/page/2/#post-6233014)
 * Status: resolved