WordPress.org

Ready to get started?Download WordPress

Forums

BackWPup Free - WordPress Backup Plugin
[resolved] Fatal error: Call to undefined method stdClass::add_role(In) (8 posts)

  1. mrusheleau
    Member
    Posted 1 year ago #

    Unfortunately I don't know the version of Word Press other than I know it's not current. I was trying install/update BackWPup so I could back up the our blog before installing the new WP update, but now when ever you try to access the blog or log into WP you get the following error:

    Fatal error: Call to undefined method stdClass::add_role() in /home/content/x/p/e/xpertmortgage/html/wordpress/wp-content/plugins/backwpup/inc/class-install.php on line 94

    In another forum entry mentioned that there is a file in your blog directory called wp-includes/version.php which contains the version of WP installed ... however I don't see this file in this directory.

    Any suggestions on fixing the problem with the plug-in or simply removing the plug-in so the blog is back on line & I can log-in to WP would be appreciated.

    Mike

    http://wordpress.org/extend/plugins/backwpup/

  2. mbrsolution
    Member
    Posted 1 year ago #

    Hi mrusheleau have a read at this thread, it will help you with your issue.

    Kind regards

  3. mrusheleau
    Member
    Posted 1 year ago #

    Thanks mbrsolution ... but I'm still not clear what needs to be done since alot of that thread is dealing with adminstration rights issues. Given that I know I'm using an older version (even though I can't idenify what version unless), is the work around the following?

    Replace the following code in the backwpup > inc > class-install.php file:

    get_users( array( 'blog_id' => 1, 'role' => 'administrator' ) );

    with:

    get_users( array( 'blog_id' => 1, 'role' => 'administrator', 'fields' => 'all_with_meta' ) );

    Sorry not that technical and just want to make sure I understand the work around.

    Thanks, Mike

  4. mrusheleau
    Member
    Posted 1 year ago #

    Tried this fix and it worked! Thank you.

  5. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi mrusheleau,

    the fix will make WordPress get the WP_User object that we can add the right to access the BackWPup admin page for to all admin users. Current versions of WordPress will give us the WP_User class by default. We will fix that in the next version.

    regards,
    Robert

  6. Marcelo Pedra
    Member
    Posted 1 year ago #

    Hi, I get this error in a WP 3.5.1 running under Windows Server:

    PHP Fatal error: Call to undefined method stdClass::add_role() in E:\home\vitaderm\web\wp-content\plugins\backwpup\inc\class-install.php on line 94

    The plugin had to be manually erased from the FTP because both admin pages and public webpages were blank and showin the above error. The plugin was deleted in those websites.

  7. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Marcelo,

    please do the changes on the class-install.php of our plugin. We fix this with the next release of our plugin.

    regards,
    Robert

  8. Marcelo Pedra
    Member
    Posted 1 year ago #

    ok, I'll wait for you to submit the new version of the script. I will stop updating it until the bugs are the lesser possible.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic