• Hi,
    First of all, awesome plugin, use it every day in my workjob ??

    An annoying issue i’ve found is that QM is spamming my debug.log with this when i go to the frontend:

    [31-Aug-2024 00:51:38 UTC] PHP Warning:  Undefined array key "C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/header.html" in C:\laragon_new\www\XXX\wp-content\plugins\query-monitor\output\html\theme.php on line 163
    [31-Aug-2024 00:51:38 UTC] PHP Warning:  Undefined array key "C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/footer.html" in C:\laragon_new\www\XXX\wp-content\plugins\query-monitor\output\html\theme.php on line 163


    For info, i use PHP 8.3 at the moment but i don’t think (not quite sure) that’s it’s related.
    What i found out is that QM seems to be collecting data differently about “paths” on Windows (which is causing the PHP Warnings.

    When i log $parts and $data->count_template_parts, i can clearly see that one is using forward slashes but the other one is using a mix, the logs:

    [31-Aug-2024 00:59:27 UTC] DEBUG: $parts Array
    (
    [C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/header.html] => parts/header.html
    [C:/laragon_new/www/XXX/wp-content/themes/XXX/parts/footer.html] => parts/footer.html
    )
    [31-Aug-2024 00:59:27 UTC] DEBUG: $data->count_template_parts Array
    (
    [C:\laragon_new\www\XXX/wp-content/themes/XXX/parts/header.html] => 1
    [C:\laragon_new\www\XXX/wp-content/themes/XXX/parts/footer.html] => 1
    )


    If you have an idea on how to fix this, that would be great ??

    Have a good day,
    Damien

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.