43

A site of my company uses blog on WordPress 3.3.1 with theme based on Twenty Ten. Last week I upgraded Apache and PHP on our production server. Afterwards the dashboard refused to work. When a user logs in, a blank dashboard appears. A menu with links is still present, but none of the links work, so one cannot create new posts etc. In the page source I see the following message:

Fatal error: Access to undeclared static property: WP_Screen::$this in blog/wp-admin/includes/screen.php on line 706

There were no changes to WordPress configuration made and no new plugins installed. How to fix the issue?

1
  • 3
    Why you will not update to the current stable release of WordPress with support for newer php versions?
    – bueltge
    Dec 23, 2013 at 9:59

4 Answers 4

83

There is a bug in WordPress 3.3.1 causing the issue. It may affect other versions as well.

To solve the issue you can update WordPress to the current stable release and do integration testing afterwards. Or you can do a quick bug fix.

To fix the bug:

  1. Open file blog/wp-admin/includes/screen.php in your favorite text editor.
  2. On line 706 find the following PHP statement: <?php echo self::$this->_help_sidebar; ?>
  3. Replace it with the statement: <?php echo $this->_help_sidebar; ?>
  4. Save your changes.

Hope it helps you.

3
  • Thanks, I just have same issue and fixed it. What is bug in above line? Because initially my site working perfect until I see above error.
    – Imran
    Feb 25, 2015 at 10:55
  • 1
    @Imran The bug is a syntactically wrong reference to property '_help_sidebar' of an instance of class WP_Screen. Looks like PHP interpreters before some version are lenient to this statement, but after upgrade to some newer version simply report the error. Feb 27, 2015 at 9:26
  • I know 'thanks' comments are discouraged, but this took seconds to deploy and literally saved my blog. This weird issue doesn't even appear to show up in my error logs.
    – 1owk3y
    Feb 12, 2017 at 7:12
2

Dmitry's answer of replacing the wrong PHP statement appears best to me:

Replace <?php echo self::$this->_help_sidebar; ?>

With <?php echo $this->_help_sidebar; ?>

3
  • Making changes to core files is never advisable as you are going to loose the change on updates and also restrain yourself from commenting in the answer thread, I do understand you don't have the privilege to add comments yet, but lets keep the answer threads for answers exclusively Dec 24, 2013 at 13:50
  • 2
    True, but if this white screen of death just prevents you from upgrading to the version where this bug has been fixed (ie latest :) ) then this is the fastest solution. Your changes will be immediately overwritten, so the unwanted side effect is just gone. Mar 6, 2014 at 10:20
  • Site I haven't touched in 10 years just had this happen. Thank you, was able to fix easily
    – beefaroni
    Dec 8, 2020 at 3:02
0

you have three options

  • Downgrade the php - you probably not going to like it
  • Upgrade wordpres - you running 3.3.1? it is upgrade time in any case
  • Fix the error in core - Not as bad as it sound, as "screen" code controls the help screen and you might not need help in operating wordpress any longer.
0

Even though you haven't made any configuration changes or added new plugins to WordPress, upgrading the underlying PHP version could be causing a conflict with one of the plugins you'd already been using successfully.

Since you can't get to your admin dashboard to disable plugins, try simply re-naming your /wp-content/plugins folder to something like /wp-content/plugins-OLD and then try to access the admin again.

If you can successfully get in after disabling your plugins, then you can go about re-enabling them 1 by 1 to see which one is possibly the culprit and leave it disabled until you upgrade the core of WordPress and the plugin itself to the latest versions that hopefully don't have these problems.

Not the answer you're looking for? Browse other questions tagged or ask your own question.