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’:.
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
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.