• Resolved zampettim

    (@zampettim)


    I’m seeing the following error in my Admin panel and in the wordpress logs with the latest wordpress 6.5.4 and W3 Total Cache plugin 2.7.2.

    ?
    
    component: "Plugin: w3-total-cache"
    
    ?
    
    file: "wp-content/plugins/w3-total-cache/PgCache_Plugin_Admin.php"
    
    ?
    
    key: "f7642cb1d1e2dd52131711e39f83c489"
    
    ?
    
    line: 352
    
    ?
    
    message: 'Undefined array key "php_requests_v"'
    
    ?
    
    stack: Array(8) [ "WPForms\\ErrorHandler->error_handler()", "W3TC\\PgCache_Plugin_Admin->w3tc_usage_statistics_summary_from_history()", "apply_filters('w3tc_usage_statistics_summary_from_history')", … ]
    
    ??
    
    0: "WPForms\\ErrorHandler->error_handler()"
    
    ??
    
    1: "W3TC\\PgCache_Plugin_Admin->w3tc_usage_statistics_summary_from_history()"
    
    ??
    
    2: "apply_filters('w3tc_usage_statistics_summary_from_history')"
    
    ??
    
    3: "W3TC\\UsageStatistics_StorageReader->get_history_summary()"
    
    ??
    
    4: "W3TC\\UsageStatistics_Plugin_Admin->w3tc_ajax_ustats_get()"
    
    ??
    
    5: "do_action('w3tc_ajax_ustats_get')"
    
    ??
    
    6: "W3TC\\Generic_Plugin_Admin->wp_ajax_w3tc_ajax()"
    
    ??
    
    7: "do_action('wp_ajax_w3tc_ajax')"
    
    ??
    
    length: 8
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @zampettim

    Thank you for reaching out and I am happy to help!

    This seems to be related to the Statistics widget. Can you please let me know if the statistics are enabled in Performance>General Settings and also, please purge the cache and let me know if the problem persists.

    Thanks!

    Thread Starter zampettim

    (@zampettim)

    I’m using the free version, so the Statistics is not able to be enabled. Purging cache has not effect and the error persists.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @zampettim

    We were unable to replicate the issue.

    Can you confirm if you have problems with the website performance or admin issues?

    Thanks!

    Thread Starter zampettim

    (@zampettim)

    I’m not able to determine if there is any performance issues and there does not appear to be any admin issues. But the error is repeatable just by keeping the Browser Console open in Developer Tools (on Firefox). There are also PHP errors in the PHP log on the server associated with this, so is definitely a bug in the code.

    Looking at line 352 in PgCache_Plugin_Admin.php, the line is:

    $pagecache[‘requests’] = $summary[‘php’][‘php_requests_v’];

    But looking through the rest of the code, there is nothing that ensures that $summary[‘php’][‘php_requests_v’] exists or is set. There is a check of isset($summary[‘php’]). So it would appear to be that the simple fix is to test to see if array key exists, and if not, abort the rest of the function or otherwise compensate.

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