Title: Issue with get_current_screen() ?
Last modified: July 30, 2024

---

# Issue with get_current_screen() ?

 *  Resolved [paullacey](https://wordpress.org/support/users/paullacey/)
 * (@paullacey)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-get_current_screen/)
 * I’m getting critical errors on some sites and Modula seems to be the single point
   of refererence in each case. I’ve pasted the error below – chatgpt seems to think
   that it’s to do with calling get_current_screen() on front end and suggests this:
 * // In class-modula.php around line 389
   if (is_admin()) {$screen = get_current_screen();//
   Ensure $screen is available before using itif ($screen) {// Your existing code
   that uses $screen}}
 * FYI – 2 plugins that I had conflict with, Beaver Builder in edit mode… And SEO
   Press
 * [Tue Jul 30 12:37:22.747867 2024] [proxy_fcgi:error] [pid 2511180:tid 2511281][
   client 172.70.85.189:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught
   Error: Call to undefined function get_current_screen() in /home/simplyhen/webapps/
   app-simplyhen2022/wp-content/plugins/modula-best-grid-gallery/includes/class-
   modula.php:389\nStack trace:\n#0 /home/simplyhen/webapps/app-simplyhen2022/wp-
   includes/class-wp-hook.php(324): Modula->modula_enqueue_media()\n#1 /home/simplyhen/
   webapps/app-simplyhen2022/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\
   n#2 /home/simplyhen/webapps/app-simplyhen2022/wp-includes/plugin.php(517): WP_Hook-
   >do_action()\n#3 /home/simplyhen/webapps/app-simplyhen2022/wp-includes/media.
   php(4960): do_action()\n#4 /home/simplyhen/webapps/app-simplyhen2022/wp-content/
   plugins/wp-seopress/src/Actions/Admin/ModuleMetabox.php(69): wp_enqueue_media()\
   n#5 /home/simplyhen/webapps/app-simplyhen2022/wp-content/plugins/wp-seopress/
   src/Actions/Admin/ModuleMetabox.php(170): SEOPress\Actions\Admin\ModuleMetabox-
   >enqueueModule()\n#6 /home/simplyhen/webapps/app-simplyhen2022/wp-includes/class-
   wp-hook.php(324…’, referer: [https://simplyhen.co.uk/wp-admin/post.php?post=1148&action=edit&classic-editor](https://simplyhen.co.uk/wp-admin/post.php?post=1148&action=edit&classic-editor)

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

 *  Thread Starter [paullacey](https://wordpress.org/support/users/paullacey/)
 * (@paullacey)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-get_current_screen/#post-17922306)
 * Just for extra context…
 * The issue ith SEOPress can be partially resolved by turning off the front end
   SEO metabox editor. 
   And the issue with Beaver Builder is when editing on the
   front end with Beaver Builder…
 * So it seems that it’s anything that is sort of front end editing modes combined
   with Modula Gallery installed.
 * Thanks in advance
 *  Plugin Author [Cristian Raiber](https://wordpress.org/support/users/cristianraiber-1/)
 * (@cristianraiber-1)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-get_current_screen/#post-17922388)
 * [@paullacey](https://wordpress.org/support/users/paullacey/) – should be fixed
   now w/ version 2.8.19
 *  Thread Starter [paullacey](https://wordpress.org/support/users/paullacey/)
 * (@paullacey)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-get_current_screen/#post-17922554)
 * Wow that was fast. Yes, whatever you patched for Divi… patched it for Beaver 
   Builder and SEO Press too. 
   Thanks
 *  Plugin Author [Cristian Raiber](https://wordpress.org/support/users/cristianraiber-1/)
 * (@cristianraiber-1)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-get_current_screen/#post-17922585)
 * Happy to hear it’s fixed now!

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

The topic ‘Issue with get_current_screen() ?’ is closed to new replies.

 * ![](https://ps.w.org/modula-best-grid-gallery/assets/icon-256x256.png?rev=3095828)
 * [Modula Image Gallery - Photo Grid & Video Gallery](https://wordpress.org/plugins/modula-best-grid-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/modula-best-grid-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/modula-best-grid-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/modula-best-grid-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/modula-best-grid-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/modula-best-grid-gallery/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Cristian Raiber](https://wordpress.org/support/users/cristianraiber-1/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/issue-with-get_current_screen/#post-17922585)
 * Status: resolved