WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error: Call to undefined function get_current_screen() (13 posts)

  1. EdwardMartinIII
    Member
    Posted 1 year ago #

    I have a new WP install. 62 different pages, a little blog distributed around based on category. I've installed the e-commerce plug-in, added a few products. Still testing...

    I keep everything in it up-to-date, checking for updates at least twice daily. I'm hosted on Dreamhost.

    I haven't yet gone live with the site (it's filled with Latin text right now) because there is a weird error I keep getting.

    Error #1:

    1. In the Dashboard, I click [Appearance] >> [Edit CSS]
    2. In the CSS window, I make a change, such as p {color:pink;}
    3. I click [Save Stylesheet]
    4. I receive an error message that reads:
    Fatal error: Call to undefined function get_current_screen() in /home/edwardmartiniii/testy.hellbendermedia.com/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/product-functions.php on line 23
    5. So, I click the BACK button on my browser, and once again click [Appearance] >> [Edit CSS]
    6. My change is not present.
    7. So, I open the described file "product-functions.php". Line #23 reads:
    $current_screen = get_current_screen();
    8. Meaning I can't edit the CSS programmatically. I don't know what this function is SUPPOSED to be doing, and I don't know why editing the CSS calls a function in the e-commerce module anyway.
    9. Troubleshooting suggestions welcome! I could MANUALLY edit the CSS file and then upload it, but I'm afraid any changes I make will simply be lost in the next update.

    Thanks!

    Edward

  2. David Choi
    Member
    Posted 1 year ago #

    The function get_current_screen() is included since WP 3.1, are you using old WP version?

    http://codex.wordpress.org/Function_Reference/get_current_screen

  3. EdwardMartinIII
    Member
    Posted 1 year ago #

    Sorry -- I forgot to add that bit.

    I'm using WordPress 3.5.1.

    I check for updates to WP and to all plug-ins roughly twice a day.

  4. David Choi
    Member
    Posted 1 year ago #

    Can't find any clues then, probably only the

    wp-e-commerce

    developer can help you.

  5. EdwardMartinIII
    Member
    Posted 1 year ago #

    Dang! That got me thinking.

    I deactivated the e-commerce plug-in and tried to edit the CSS. Worked great.

    Reactivated the e-commerce plug-in.

    Tried again. Fail condition.

    So this much I know -- the problem is probably in the e-commerce module (or at least manifests there).

    I CAN change my CSS, but I have to temporarily bring the e-commerce plug-in down.

    It's hacky, but I'm back in business at least.

  6. David Choi
    Member
    Posted 1 year ago #

    As long as it works, it's a perfect solution :)

  7. dianaascher
    Member
    Posted 1 year ago #

    Same issue here. Would you advise using a different e-commerce plugin? If so, which one?

  8. EdwardMartinIII
    Member
    Posted 1 year ago #

    "Same issue here. Would you advise using a different e-commerce plugin? If so, which one?"

    I got tired of the hack.

    I dumped e-commerce and instead installed MarketPress and bought a subscription to the company's support system. I regret NOTHING!

    I now use several of their plug-ins. Three thumbs up!

  9. dianaascher
    Member
    Posted 1 year ago #

    Thank you very, very much!

  10. EdwardMartinIII
    Member
    Posted 1 year ago #

    Please let me know if that ends up helping! 8)

  11. rikboy
    Member
    Posted 10 months ago #

    1. Open "wp-content/plugins/wp-e-commerce/wpsc-admin/admin.php"
    2. After Line #26: Add "require_once(ABSPATH . 'wp-admin/includes/screen.php');"
    3. Save your changes... and see if bug still exists.
  12. rikboy
    Member
    Posted 10 months ago #

    Hello,

    1. Open "wp-content/plugins/wp-e-commerce/wpsc-admin/admin.php"
    2. After Line #26: Add "require_once(ABSPATH . 'wp-admin/includes/screen.php');"
    3. Save your changes... and see if bug still exists.

    Good luck.:)

  13. mingoad
    Member
    Posted 4 months ago #

    Hello @rikboy
    I wanted to thank you for the help. You fixed the issue I had with the wordpress website I am working on right now.
    Again thanks a lot!

Topic Closed

This topic has been closed to new replies.

About this Topic