Title: Frequent errors
Last modified: April 9, 2025

---

# Frequent errors

 *  Resolved [leodefaveri](https://wordpress.org/support/users/leodefaveri/)
 * (@leodefaveri)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/frequent-errors/)
 * Hi!
 * Sometimes I have received this error in an ecommerce, through Log WordPress by
   Email. Any suggestions of what may be happening? I use Varnish (cloudpanel) +
   redis + cloudflare. Thank you!
 *     ```wp-block-code
       Plugin atual: W3 Total Cache (versão 2.8.7) PHP versão 8.3.17 Detalhes do erro ================ Um erro do tipo E_ERROR foi causado na linha 228 do arquivo /wp-content/plugins/w3-total-cache/Root_Loader.php. Mensagem de erro: Uncaught Error: Call to undefined function W3TC\get_current_screen() in /wp-content/plugins/w3-total-cache/Root_Loader.php:228Stack trace:#0 /wp-includes/class-wp-hook.php(324): W3TC\Root_Loader->w3tc_modify_query_obj()#1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#2 /wp-includes/plugin.php(565): WP_Hook->do_action()#3 /wp-includes/class-wp-query.php(1881): do_action_ref_array()#4 /wp-includes/class-wp-query.php(3852): WP_Query->get_posts()#5 /wp-content/themes/woodmart/inc/actions.php(344): WP_Query->query()#6 /wp-includes/class-wp-hook.php(326): woodmart_custom_404_page()#7 /wp-includes/plugin.php(205): WP_Hook->apply_filters()#8 /wp-includes/template.php(103): apply_filters()#9 /wp-content/plugins/perfmatters/inc/functions.php(1042): get_query_template()#10 /wp-content/plugins/perfmatters/inc/functions.php(954): perfmatters_disable_login_url()#11 /wp-includes/class-wp-hook.php(324): perfmatters_wp_loaded()#12 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#13 /wp-includes/plugin.php(517): WP_Hook->do_action()#14 /wp-settings.php(726): do_action()#15 /wp-config.php(115): require_once('...')#16 /wp-load.php(50): require_once('...')#17 /wp-admin/admin.php(34): require_once('...')#18 {main} thrown
       ```
   

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/frequent-errors/#post-18408176)
 * Hello [@leodefaveri](https://wordpress.org/support/users/leodefaveri/)
 * Thank you for reaching out and I am happy to help!
   This may happen if it isn’t
   loaded and available until after `admin_init` has been fired. Thank you for taking
   the time to share thisCan you please replace the /wp-content/plugins/w3-total-
   cache/Root_Loader.php line 228
 * from: `$screen = get_current_screen();
   To:
 *     ```wp-block-code
           if ( function_exists( 'get_current_screen' ) ) {        $screen = get_current_screen();	} else {        return;    }
       ```
   
 * Lee me know if this helps and this will be fixed in the upcoming release
   Thanks!
 *  Thread Starter [leodefaveri](https://wordpress.org/support/users/leodefaveri/)
 * (@leodefaveri)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/frequent-errors/#post-18408317)
 * Hi [@vmarko](https://wordpress.org/support/users/vmarko/) ! Thank you for your
   response!
 * I made the suggested change and I need to wait, as the error occurs at any time.
   If it occurs again, I will come back to warn. Thank you very much for the quick
   response to the problem!
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/frequent-errors/#post-18409681)
 * Hello [@leodefaveri](https://wordpress.org/support/users/leodefaveri/)
 * You are most welcome!
 * We would really appreciate it if you could take a minute and post a review [here](https://wordpress.org/support/plugin/w3-total-cache/reviews/).
   This will help us to continue offering a top-notch product to users.
   Thanks!

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

The topic ‘Frequent errors’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/frequent-errors/#post-18409681)
 * Status: resolved