solved wordpress 3.3 dashboard blank issue

Recently, I came across very weird issue. I found wordpress 3.3 dashboard blank issue on my PC. There are many wordpress admin pages not shown to me. suddenly all admin pages became blank.
Only left side bar was visible to me. I checked my site in firefox, chrome, IE browser but same result. I am not able to see the posts, dashboard. Only left sidebar was visible.
I was using wordpress Version 3.3.2. I was using php 5.5 on my local box.

solved wordpress 3.3 dashboard blank issue

Note: This issue nothing to do with plugins or images. When I realized on production server I was using PHP 5.3 and local box I am using PHP 5.5 version. I quickly solved issue.

I enabled debug mode of wordpress using wp-config.php file. You can open wp-config.php file put following code in that.

/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', true);

When I checked apache error logs I found following error:

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

Solution:

This is old bug in WordPress 3.3 versions which causing issue.

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.

Open file in your wordpress, wp-admin/includes/screen.php in any text editor.
On line no 706 find following PHP statement: <?php echo self::$this->_help_sidebar; ?>
Replace with above: <?php echo $this->_help_sidebar; ?>
Save changes and that will solve your issue.

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

Above code is working with PHP 5.3 version but with newer PHP 5.5 version. We are facing issues.

wordpress comment preview for box comment without plugin

Showing wordpress comment preview for comment box is always good for attracting the visitors. I shown code here for show the comments preview.

wordpress comment preview for comment box

Many times comments preview will be useful for visitors to see how comments will be looking. Using google Jquery or wordpress jquery you can add the comment preview to your wordpress blog. Showing comment preview is always good for attracting the visitors. Many clients demands for this. I shown you the example code over here for show the comments preview.

In this tutorial I am using the wordpress inbuild jquery.  First open your header. php file from your theme folder and after head tag following code.


<?php wp_enqueue_script(</code><code>'jquery'</code><code>); ?>
<?php if (is_single()) { ?>

<script type="text/javascript">

jQuery(document).ready(function(){

	jQuery("").add("<h3 id='preview-title'>Comment Preview</h3><div id='comment-preview'></div>").appendTo(document.body);
	jQuery("#comment-preview, #preview-title").insertAfter("#comment");

	var $comment = '';
	jQuery('#comment').keyup(function() {
		$comment = jQuery(this).val();
		$comment = $comment.replace(/\n\n+/g, '<br /><br />').replace(/\n/g, "<br />");
		jQuery('#comment-preview').html( $comment );
	});

});

</script>
<?php } ?>

Then Open Your style.css file from your theme folder put the following code in that file.

#comment-preview {
	border: 1px solid #ccc;
	padding: 5px 15px 15px 15px;
	}
h3#preview-title {
	margin-bottom: 5px
	}

After that upload the modified files on server. you will see following functionality for your wordpress commnets section.

wordpress comment preview for comment box
wordpress comment preview for comment box

If you are not wordpress developer then please dont try this.