WordPress.org

Ready to get started?Download WordPress

Forums

Fatal error after upgrade (19 posts)

  1. aborisov
    Member
    Posted 3 years ago #

    Hello!

    I have two forums and on both of them I have the same error after the upgrade

    Fatal error: Call to undefined method stdClass::add_query_var() in ambnotes/wp-includes/taxonomy.php on line 316

    I've looked in the taxonomy.php file and here is not even 316 lines.

    How to fix it?

  2. Tara
    Member
    Posted 3 years ago #

    -Call to undefined function could mean that your upgrade probably did not succeed. Do a manual update via FTP instead: http://codex.wordpress.org/Updating_WordPress#Manual_Update

    -also review this sticky: http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list?replies=22

  3. aborisov
    Member
    Posted 3 years ago #

    Tried to do manual update. Still getting same error message.

  4. @mercime
    Volunteer Moderator
    Posted 3 years ago #

    http://core.trac.wordpress.org/browser/tags/3.1/wp-includes/taxonomy.php line 316 is
    $wp->add_query_var($args['query_var']);

    Change theme to default theme and deactivate all plugins..

  5. aborisov
    Member
    Posted 3 years ago #

    Tried it too. Also, deleted /wp-admin and /wp-includes. Deactivated all of my plugins, activated default theme... Tried everything

    Still getting the same error.

  6. Tara
    Member
    Posted 3 years ago #

    have you discussed the issue with your hosting provider?

  7. @mercime
    Volunteer Moderator
    Posted 3 years ago #

    I have two forums and on both of them I have the same error after the upgrade

    What forum plugin/s are you using?

  8. aborisov
    Member
    Posted 3 years ago #

    For forum I'm using simple forum plugin. On my one wordpress site. But I think it is not really important because on another one I'm using bbpress. But what's really interesting I'm getting the same error message on both wordpress sites.

  9. @mercime
    Volunteer Moderator
    Posted 3 years ago #

    The error you mentioned was in all probability caused by a plugin or functions within custom theme, but more likely by a plugin.

    You mentioned you deactivated the plugins - via dashboard I presume? Deactivate plugins again, but this time rename the plugins folder to e.g. plugins-ex and then run Settings > Permalinks. Also, if you are on multisite and are using mu-plugins folder, rename that as well.

  10. aborisov
    Member
    Posted 3 years ago #

    I don't have multisites. Just two different wordpress blogs. They are separated.

    I'll try to rename /plugins just don't think it will make a differences. I'll do it. Really sick now.

  11. @mercime
    Volunteer Moderator
    Posted 3 years ago #

    I'll try to rename /plugins just don't think it will make a differences.

    It could make a difference because there are times when a recently deactived plugin can still cause problems. Same with renaming the themes folder in wp-content

  12. blogher8
    Member
    Posted 3 years ago #

    I have the same problem.

    I am getting this error message after using the WP automatic upgrade to 3.1:

    Fatal error: Call to undefined method stdClass::add_query_var() in .../wp-includes/taxonomy.php on line 316

    I checked that file, and it says:

    $wp->add_query_var($args['query_var']);

    (as it should).

    I changed the plugin and theme folder names as directed above.
    I tried manually reinstalling WordPress. Problem persists.

  13. Tara
    Member
    Posted 3 years ago #

  14. blogher8
    Member
    Posted 3 years ago #

    Yes, t-p, thanks. I should have mentioned that.

    I can't see anything relevant there for my issue. I am surprised that only two of us experienced this problem and complained about it (apparently), and that it persisted with a manual reinstall for both of us.

    I have a single WP install.

    Also, FWIW, I can't change my theme, since I can't login, but I did change the theme folder name, so it won't be used.

    Ditto plugins, which were deactivated, but I changed the folder name anyway, trying to cover my bases.

  15. Tara
    Member
    Posted 3 years ago #

    check WP Track for any ticket,etc.

    -also, contact you hosting provider. Ask them if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, etc.

  16. blogher8
    Member
    Posted 3 years ago #

    Thanks, t-p. Will do.

    If anyone else has solved this problem, would love to hear.

    aborisov?
    I hope you did not give up.

  17. wefreema
    Member
    Posted 3 years ago #

    Are you guys still stuck on this?

    add_query_var is located in wp-includes/class-wp.php

    Does that file exist? Does the function exist? (should be line 93)

    Wes

  18. wildflowers1
    Member
    Posted 3 years ago #

    I too have just upgraded to 3.1 and am unable to access my wp_admin all I get is a white page,my blog is ok and I was able to access before the up grade.
    Have deleted all my plugins and re named my plugins file
    http://www.wildflowersaromatherapy.com/blog/
    http://www.wildflowersaromatherapy.com/blog/wp-login.php

  19. _ck_
    Member
    Posted 2 years ago #

    The reason why some legacy installs cannot upgrade beyond version 3.0 is this:

    Check wp-config.php for any lines that define a $wp-> object setting.

    They will break 3.1 and above and give a $wp->add_query_var error.

    For example:

    $wp->cookiedomain = '.example.com';

    Will work in 3.0 and below but break WP 3.1 and 3.2

    You'll have to research for the replacement define setting as an alternative to $wp->

    For example, the modern replacement for the above line is
    define(COOKIE_DOMAIN,'.example.com');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags