WordPress.org

Ready to get started?Download WordPress

Forums

get_current_screen() in \wp-admin\network\settings.php on line 22 (6 posts)

  1. jsites
    Member
    Posted 1 year ago #

    I've got a testing environment set up on my work PC, and I am starting to play around with the Multisite features of WordPress.

    I'm running a Windows 7 box using XAMPP 3.1.0 to run WordPress locally for developing WordPress themes and custom WordPress sites.

    Today I started with a clean slate, and installed WordPress 3.5.1 into the environment. Everything runs perfectly. I then followed the instructions here: http://codex.wordpress.org/Create_A_Network

    I have 2 sites set up that are sort of working on the network now. If Site A and Site B have the Twenty Twelve theme active, everything works peachy keen.

    If I have Site B set to my custom theme, everything works peachy keen.

    If I have Site A set to my custom theme, everything isn't peachy keen.

    When I attempt to go to any of these menu pages from Site A:
    My Sites > Network Admin
    My Sites > Network Admin > Dashboard
    My Sites > Network Admin > Sites
    My Sites > Network Admin > Users

    I get this error:

    Fatal error: Call to undefined function get_current_screen() in C:\WP_Network\xampp\htdocs\wordpress\wp-admin\network\settings.php on line 22

    The only files I've modified on Site A and Site B are the files housed in my theme's folder, so I don't really understand why there's an error on Site A and not Site B.

    Anyone have any thoughts on why this might be happening?

  2. jsites
    Member
    Posted 1 year ago #

    Update with maybe some relevant info:

    Site A is located at:
    http://localhost/wordpress/

    Site B is located at:
    http://localhost/wordpress/secondsite/

    So I'm wondering if maybe this has something to do with it.

  3. jsites
    Member
    Posted 1 year ago #

    Update 2:
    I was able to fix the Site A location through the database, so it's now located at:
    http://localhost/wordpress/firstsite/

    But I still have the errors when trying to access the multi-site admin tools.

  4. codingpuss
    Member
    Posted 1 year ago #

    Hi jsites,

    The definition of the function get_current_screen is in wp-admin\includes\screen.php. I think you may want to try to include the file screen.php in settings.php

  5. dianaascher
    Member
    Posted 1 year ago #

    Hi codingpuss,

    Can you explain what you mean by including screen.php in settings.php? I’m have a similar error:

    Fatal error: Call to undefined function get_current_screen() in /home/bspa2012/public_html/wp-content/plugins/wp-e-commerce/wpsc-admin/display-items.page.php on line 493.

    Thanks in advance,
    Diana

    (My site is not live, or I would share it. It’s for a client and it can’t go live until it’s approved.)

  6. codingpuss
    Member
    Posted 11 months ago #

    Hi Dianna,

    Sorry for the late reply.

    I solved my problem by removing all the include_once, require_once in the index.php file (you will need to move all the content from included files to index.php of course). I don't know if it works on other plugins but in my plugin, it works.

    cp

Topic Closed

This topic has been closed to new replies.

About this Topic