Catchable fatal error: Object of class WP_Error could not be converted to string in /wp-includes/formatting.php on line 1025

Catchable fatal error: Object of class WP_Error could not be converted to string in /wp-includes/formatting.php on line 1025, this was one the WordPress Error annoyed me for days.I took post on several blog, pages stack overflow, no ones answer was not satisfiable and doesn’t solved my issue. So, i started my own journey and found the problem.

How to identify, what is the actual problem ..?
Even in wordpress, sometimes it’s not easy to find the exact problem.It’s better to create a error log and find out the problem accurately.To create a error log, just add the below codes in your wp-config.php file existed in the root directory, just before the line it says ‘stop editing here’:.

Now, execute the query once again (I recommend only execute once, so we can find the exact error, rather than searching on a lot of lines).

After execution i got an error log and from that i find out that very important tables of wordpress was missing.wp_commentmeta and wp_comments. I created those tables manually (actually imported the table structure from another word press database) and voila…Error was gone…

So, if you face such problems, use this method and you can definitely find the problem.Or just post below this post, i will help you to sort out.

2 Comments

  1. Christian (Post author)

    I am happy to find this, I was in a kind of same situation as yours.Thanks…

    Reply
  2. Jassim

    Very useful, finally found it here..

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *