lrnirjhar
Member
Posted 1 year ago #
Hi,
I am facing problem with my page management. I am getting this:
************************
Fatal error: Call to a member function query() on a non-object in /home/nirjharc/public_html/wp-admin/includes/template.php on line 557
**********************
I did export and import my data both in DB backup and export/import (WP) and fresh install WP again. Same problem. I import this data in my wordpress.com account and same problem occurred there too.
In my dash board it is showing I have two page but I can find only one page and this page can be modified only by Windows Live Writer.
Please help me what I have to do. My blog address is http://www.nirjhar.com
Thanks
Nirjhar
lrnirjhar
Member
Posted 1 year ago #
Hi All,
I have solved this just now. I have just deleted the page which I can't see from database. And now it is working.
thanks
Nirjhar
madrone78
Member
Posted 1 year ago #
Hello, I am getting this message and cannot manage pages in dashboard:
Fatal error: Call to a member function query() on a non-object in /home/nirjharc/public_html/wp-admin/includes/template.php on line 557
What page did you delete in the database?
I ran into the same error as above in WP 2.6.2 Fatal error: Call to a member function query() on a non-object in /wp-admin/includes/template.php on line 557
Problem ended up being with a post that was partially saved to the database. Deleting the following row from the wp_posts table resolved the issue.
mysql> select * from wp_posts \G
*************************** 8. row ***************************
ID: 0
post_author: 1
post_date: 0000-00-00 00:00:00
post_date_gmt: 0000-00-00 00:00:00
post_content:
post_title: Dealer Info
post_category: 0
post_excerpt:
post_status: draft
comment_status: open
ping_status: open
post_password:
post_name:
to_ping:
pinged:
post_modified: 2008-10-03 20:54:32
post_modified_gmt: 2008-10-04 02:54:32
post_content_filtered:
post_parent: 0
guid:
menu_order: 0
post_type: page
post_mime_type:
comment_count: 0
8 rows in set (0.00 sec)
d3athjam
Member
Posted 1 year ago #
I had the same error. It had something to do with too many pages messing up with my template.
How I solved this was to go the pages, search for 'a'. This brings up all the pages you have. What I did was to then delete my useless pages (ard 8 out of 12) and that solved the error.