• alexleonard

    (@alexleonard)


    I just updated a blank blog to 2.5.1 and then imported a small number of posts/pages from wordpress.com (favour for a friend).

    When I go into Manage > Pages I get this error

    Fatal error: Call to a member function query() on a non-object in /domain.com/httpdocs/wp-admin/includes/template.php on line 507

    Which appears just above the thead of the pages table. The error only seems to appear after attempting to import the word press blog posts, which on import generate the following error (this is when I select the option to include attachments):

    Fatal error: Maximum execution time of 60 seconds exceeded in /domain.com/httpdocs/wp-includes/plugin.php on line 274

    If I don’t select the option to include attachments, I get this error:

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 89 bytes) in
    /domain.com/httpdocs/wp-includes/plugin.php on line 132
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 82 bytes) in
    /domain.com/httpdocs/wp-includes/plugin.php on line 272

    I’ve just dropped and rejigged the database and will just leave it blank for the time being. Not a major worry for me, but thought I should throw it up here in case anyone has come across this before, and if not, perhaps there’s an incompatibility somewhere along the line?

Viewing 6 replies - 1 through 6 (of 6 total)
  • wessex

    (@wessex)

    I’ve just come across the very same error in Manage > Pages after upgrading from 2.3.1 to 2.5.1.

    Also (possibly connected?), adding the pages widget also causes the widget engine to stop working.

    Any ideas?

    Apparently this seems to happen when upgrading. I fixed it by inserting

    global wpdb;

    in the beginning of the page_rows function, line 491 at wp-admin/includes/template.php.

    hth

    sorry, that should be

    global $wpdb;

    Hi jpburstrom,

    I facing the same problem with the wp-admin/includes/template.php on line 507 in one of my wp blogs version 2.5.1

    Just add in the global $wpdb; on line 491 at wp-admin/includes/template.php, it works normal and fine again!

    Thanks man! solve my biggest problem of my day!

    Sorry…
    I have a same problem.
    Where i put this code correctely (global $wpdb;) in the template.php?
    Can you show me?

    Hi,

    Could someone just point out where exactly the global $wpdb; should go Would this be correct?

    ————————-
    * displays pages in hierarchical order
    */
    function page_rows( $pages ) {
    global $wpdb; if ( ! $pages )
    $pages = get_pages( ‘sort_column=menu_order’ );

    if ( ! $pages )
    return false;

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error on manage pages after import’ is closed to new replies.