• Resolved Michael Kupietz

    (@mkupietz)


    The below is not detailed enough to be of use, it’s making me go manually open the debug log to get any useful information. The PHP error log lists the file and line number where this error is occuring (and it’s the same one every time). The plugin only shows me there’s a bad variable somewhere on my site, with no further info.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Michael Kupietz

    (@mkupietz)

    For some reason, the post is not displaying my pasted screenshot. It’s a line of the log, as displayed by the plugin, with only the following text:
    PHP Warning Undefined variable $startfrom Sep 5, 2025 - 20:26:04
    (335 occurrences logged)

    Thread Starter Michael Kupietz

    (@mkupietz)

    I also now have lines saying:
    PHP WarningDOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 161 Sep 5, 2025 - 21:05:58
    (1 occurrence logged)

    This shows a line number, but no file.

    Plugin Author Bowo

    (@qriouslad)

    @mkupietz thank you for reporting the issue. Do you mind copy pasting the actual log entry from the debug.log file as well? So I can compare between the original entry and the one parsed in Debug Log Manager. This may help improve how the parsing algorithm works.

    Thread Starter Michael Kupietz

    (@mkupietz)

    I delete those logs once I’m done with them, but I do have some saved logs with similar examples. The first one would have been something like this:

    [06-Sep-2025 02:27:00 UTC] PHP Warning: Undefined variable $startfrom in /path/to/plugin/folder/plugin-name/plugin-name.php on line 955

    The second one would be something like this:

    [06-Sep-2025 02:56:20 UTC] PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 161 in /path/to/plugin/folder/plugin-name/plugin-name.php on line 1175

    Plugin Author Bowo

    (@qriouslad)

    @mkupietz thank you for digging up the original entries.

    The first one looks common and should be parsed properly by DLM. Were you saying that the ‘File’ and ‘Line’ info was not shown in DLM dashboard? I just tried manually adding the raw entry into my debug.log file, and it is parsed correctly showing the ‘Plugin’, ‘File’ and ‘Line’ info.

    The second entry’s pattern does look a bit uncommon. however, it’s still parsed correctly by DLM. I confirmed this by also pasting the raw entry into the debug.log file.

    Please see this screenshot of the DLM dashboard’s parsed entries, assuming that the two errorr originates from a PHP file in the Code Explorer plugin: https://www.imagebam.com/view/ME15Q0GH

    I wonder what could’ve been different that’s causing the issue on your site…

    Thread Starter Michael Kupietz

    (@mkupietz)

    I do have a screenshot saved, and just got yet another one with no file or line information:
    https://www.imagebam.com/view/ME15S23X
    https://www.imagebam.com/view/ME15S23Z

    That’s strange, your screenshot looks nothing like what I get. The two above are much more typical. I’ve been using this a couple of days and never once seen that sort of output, with it listing the plugin name, even when it does give the file and line.

    Right now I can’t get it to generate any error log at all besides the three messages in the second screenshot above, which is weird, because my site usually has a couple of deprecation notices and warnings that come up every time I load a page due to some plugins that the devs haven’t fully updated.

    Plugin Author Bowo

    (@qriouslad)

    Can you share the raw entries for the parsed entries in your screenshots?

    I wonder if you have any JS error in the browser console when you see those issues?

    Thread Starter Michael Kupietz

    (@mkupietz)

    Got another one with no file or line info: https://www.imagebam.com/view/ME15T4BL

    Nothing related to it in the js console.

    The original log entry is [09-Sep-2025 03:18:06 UTC] PHP Deprecated: Optional parameter $before declared before required parameter $ancestor_ids is implicitly treated as a required parameter in /path/to/plugin/folder/mk-plugin-name/mk-plugin-name.php on line 1784

    The thought strikes meβ€”is your parsing code making assumptions about the location of the WP directory, or the name of the plugins folder? WordPress config allows you to change the name of the plugins folder, it may not be /plugins/. In my case, it’s not.

    Plugin Author Bowo

    (@qriouslad)

    @mkupietz the custom plugins folder path might be the cause indeed. Let me do some more investigation and tests.

    Plugin Author Bowo

    (@qriouslad)

    @mkupietz please test this v2.3.6 with a potential fix for your use case, i.e. usage of custom plugins path: https://bowo.io/sdc_download/1131/?key=j434roynmseklxryr55i5kid2yjfia

    Thread Starter Michael Kupietz

    (@mkupietz)

    Plugin installs and activates but I can’t enable the logging. “There has been a critical error on this website. Please check your site admin email inbox for instructions. If you continue to have problems, please try the support forums

    thrown in /path/to/wordpress/wp-content/custom-plugin-folder/debug-log-manager/classes/class-debug-log.php on line 341
    8 {main}
    7 /path/to/wordpress/wp-admin/tools.php(40): require_once('…')
    6 /path/to/wordpress/wp-admin/admin.php(260): do_action()
    5 /path/to/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()
    4 /path/to/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    3 /path/to/wordpress/wp-includes/class-wp-hook.php(324): Debug_Log_Manager->create_main_page()
    2 /path/to/wordpress/wp-content/custom-plugin-folder/debug-log-manager/bootstrap.php(266): DLM\Classes\Debug_Log->get_entries_datatable()
    1 /path/to/wordpress/wp-content/custom-plugin-folder/debug-log-manager/classes/class-debug-log.php(1549): DLM\Classes\Debug_Log->get_processed_entries() 0 /path/to/wordpress/wp-content/custom-plugin-folder/debug-log-manager/classes/class-debug-log.php(341): file_get_contents()

    Stack trace:
    [11-Sep-2025 17:54:51 UTC] PHP Fatal error: Uncaught ValueError: Path cannot be empty in /path/to/wordpress/wp-content/custom-plugin-folder/debug-log-manager/classes/class-debug-log.php:341

    Plugin Author Bowo

    (@qriouslad)

    @mkupietz hmm… I’m unable to replicate the issu on two test sites. One with existing DLM v2.3.6 and another one a fresh WP install. Your error log entry points to the last line on:

        $debug_log_file_path = get_option( 'debug_log_manager_file_path' );
    
        // Read the errors log file 
        $log     = file_get_contents( $debug_log_file_path );

    …where it’s not able to get anything from get_option() which is where the custom debug.log file path is stored.

    Please try deactivating DLM (the plugin) and reactivating it again before toggling error logging ON again. This should refresh the file path stored in wp_options.

    Thread Starter Michael Kupietz

    (@mkupietz)

    Yep, deactivating/reactivating seems to have fixed it. I’m getting entries like I saw in your screenshot, properly giving plugin names, paths, and editing links. Nice.

Viewing 13 replies - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.