• Resolved jqz

    (@jqz)


    When this plugin is active (and, for notices, WP_DEBUG set to true), trigger_error does not log anything in the expected location.

    I see the reason is \stcr\stcr_utils::__construct() calls set_error_handler() to set its own error handler.

    There does not seem to be any mechanism to prevent that from happening. Is there one? Also, with your overridden error handler, where do the messages actually get logged (I can’t find any log file)?

    May I suggest the error handler be removed. It should not be down to individual plugins to control and change global error handling and reporting (for which there are already well-defined mechanisms via php.ini and WP_DEBUG-related constants – with the exception of plugins specifically for that purpose).

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jqz

    (@jqz)

    Just looked at the logging function, stcr_utils::stcr_logger() – it seems the actual logging is behind an option subscribe_reloaded_enable_log_data, the default being off (and the log file is a .txt file in the root directory of the STCR plugin installation folder, so I have answered my own question).

    What this means is that this plugin being active causes all PHP errors and notices to disappear into a black hole (unless the above option is manually changed from the default, wherever it is in the settings – I can’t find it on a quick glance through).

    This is quite a significant bug. It means that minor errors anywhere on your website will go unnoticed. Then they will become major errors as you find an small innocuous upgrade or change breaks your site. Or there are some pages on your site that have errors and don’t load but you don’t immediately find out about them because they are not being logged.

    Thread Starter jqz

    (@jqz)

    Plugin Author WPKube

    (@wpkube)

    I’m sorry for the inconvenience.

    Thank you for bringing it to our attention. We’ll release an update ASAP to get rid of that.

    It should not be down to individual plugins to control and change global error handling and reporting

    I fully agree with that, it should have been removed when we acquired the plugin.

    Thread Starter jqz

    (@jqz)

    We’ll release an update ASAP to get rid of that.

    Wow, I’m impressed by the fast turnaround – less than 24 hours to determine, review and apply the fix, and then make a new release ??

    • This reply was modified 3 years, 3 months ago by jqz. Reason: HTML not MD!
    • This reply was modified 3 years, 3 months ago by jqz. Reason: grammar
    • This reply was modified 3 years, 3 months ago by jqz. Reason: punctuation
    Plugin Author WPKube

    (@wpkube)

    Thanks ??

    And again, thanks for pointing out the issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘trigger_error does not work when plugin active’ is closed to new replies.