Sunday, October 26, 2014

WordPress dashboard loading blank page with PHP Fatal error: Access to undeclared static property: WP_Screen::$this in /home/suhail/public_html/wp-admin/includes/screen.php on line 706

The WordPress admin dashboard loading blank page for WordPress version 3.3.1. That is, when a WordPress user logs in, WordPress admin dashboard displaying blank page. Menu with links are present but none of the link works. For this reason, users can’t edit or add new posts etc.

 Here is the solution. Just go through your error logs and see the logs that you get. I have recently came across a similar situation and here’s the logs that I got.

[06-Jul-2014 05:55:27 UTC] PHP Fatal error:  Access to undeclared static property: WP_Screen::$this in /home/suhail/public_html/wp-admin/includes/screen.php on line 706
[06-Jul-2014 05:55:33 UTC] PHP Fatal error:  Access to undeclared static property: WP_Screen::$this in /home/suhail/public_html/wp-admin/includes/screen.php on line 706

To fix this bug:

1. Open the file wp-admin/includes/screen.php
2. Locate the line number 706
3. You will find the 706th line as

<?php echo self::$this->_help_sidebar; ?>
Replace the above mentioned line as

<?php echo $this->_help_sidebar; ?>
4. Save the changes. This should fix the problem.

That’s it!!!  :)

2 comments: