Support » Plugin: Query Monitor » Errors in debug mode

  • I get the following php errors when wp is in debug mode ( define(‘WP_DEBUG’, true); ):

    Notice: Trying to get property of non-object in .../wp-content/plugins/query-monitor/collectors/db_dupes.php on line 58
    Notice: Trying to get property of non-object in .../wp-content/plugins/query-monitor/collectors/db_dupes.php on line 61
    Notice: Undefined offset: 0 in .../wp-content/plugins/query-monitor/collectors/db_dupes.php on line 69
    Notice: Undefined offset: 0 in .../wp-content/plugins/query-monitor/collectors/db_dupes.php on line 72

    https://wordpress.org/plugins/query-monitor/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks!

    These notices are being caused by QM not being able to determine the component which is responsible for those queries marked as duplicated.

    Can you do me a favour please and paste (or screenshot) the complete expanded “Caller” list (from the main Queries panel) for each of the queries which are appearing as duplicate queries? I’ll then take a look at why QM cannot determine the component for those particular queries.

    That is not possible because the only place where it is reproduceable is during ajax calls. Cases where duplicate queries are indeed reported do not cause the warnings.

    To reproduce:
    Install the current release version of my plugin wp photo album plus and change any setting in the Photo ALbums -> Settings admin page ( while in debug mode ). It looks to me that it would be sufficient to test if the object is an object resp. the index exists and if not skip the code that follows.

    BTW This plugin is one of my favorite development tools to catch php warninhgs/errors and excessive db queries. Thanx for a great product!

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    I’ve installed the plugin but I’m not seeing any notices in the AJAX responses. I’m running version 6.4.06 on WordPress trunk. Is there anything unusual about the environment you’re seeing the notices on? For example symlinks in use, non-standard directory structure, etc.

    Do you have Xdebug installed? If so, are you able to take a look in your PHP error log and find the full stack trace for those notices? (Yeah I know it’s a pain that QM doesn’t expose as much information in AJAX responses as it does on a normal page load, I’m working on it!)

    I’m intentionally not adding any sanity checking to the component detection / output in order to try to find any places where component detection doesn’t work.

    It is reproduceable on wp version 4.5-alpha-1453180032918 and wppa+ version 6.4.06. My dev site runs this version of wp and only querymonitor and wppa are the active plugins.

    Maybe it is a wp 4.5 issue.

    Unfortunately i can not supply a stack trace.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Errors in debug mode’ is closed to new replies.