"Call to undefined function get_current_screen()" on multisite dashboard only (4 posts)

  1. su1
    Posted 2 years ago #


    I've recently installed a fresh multisite WordPress and installed the Artworks Responsive theme on it, it's a free theme you can get it if you want for testing purposes here: http://www.dessign.net/art-works-responsive-theme-free-2013/

    When I activate this theme, I get the following error message when I try to access the network Dashboard, and only the network Dashboard, not the other dashboards:

    Fatal error: Call to undefined function get_current_screen() in /myaccount/mysite.com/wp-admin/network/settings.php on line 22

    If I use another theme I don't get this problem, so I'm sure the problem comes from the theme, but I'd really like to find a solution to be able to keep using this theme.


  2. su1
    Posted 2 years ago #

    no luck so far!

  3. jkhongusc
    Posted 2 years ago #

    I downloaded the theme into my WP multisite instance and ran into the same problem. Going into the theme code I found the problem. In functions.php, there is an include statement on line #2 that is incorrect. It loads, in error, WP's settings.php instead of the theme's settings.php. In functions.php, fix line #2:

    - include('settings.php');
    + include(trailingslashit( get_template_directory() ).'settings.php');
  4. jkhongusc
    Posted 2 years ago #

    This is how I debugged the problem. I turned on debugging in wp-config.php:

    define('WP_DEBUG', true);

    Then I went to wp-admin/network/settings.php. Turning on debugging identified the problem at functions.php:2

Topic Closed

This topic has been closed to new replies.

About this Topic