WordPress.org

Ready to get started?Download WordPress

Forums

BackWPup Free - WordPress Backup Plugin
[resolved] Fatal error 3.0.8 to 3.0.10 (22 posts)

  1. ashh115
    Member
    Posted 1 year ago #

    I have updated 2 sites and both have the error below when I activate plugin.

    Fatal error: Call to undefined method stdClass::add_role() in ###/wp-content/plugins/backwpup/inc/class-install.php on line 94

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

  2. ashh115
    Member
    Posted 1 year ago #

    Regarding editing user role to 'BackWPup Admin' I only have one user which is master admin so I cannot change the role.

    I have used Capability Manager plugin to ensure all BackWPup privileges are checked..but still getting the same Fatal error when I activate.

    I don't dare try to update any of my other sites as these two have not worked.

  3. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi ashh115,

    please go to the "BackWPup" part of your profile page. You can add BackWPup Admin rights to your current user.

    We will check this issue and will solve it with the next version. But to help you right now please change the following on the class-install.php File:

    foreach ( $users as $user ) {
    				$user->add_role( 'backwpup_admin' );
    			}

    with

    if ( ! empty( $users ) && count( $users ) > 0 ) {
    				foreach ( $users as $user ) {
    					$user->add_role( 'backwpup_admin' );
    				}
    			}

    That should hide the fatal error. But you will need to add the BackWPup rights to every User who should get access.

  4. ashh115
    Member
    Posted 1 year ago #

    Thanks for the quick reply

    I have changed the file in backwpup > inc > class-install.php

    But I still have the Fatal error. The only way to remove the fatal error is to rename/delete the backwpup plugin folder through FTP.

    Because I am unable to activate the Backwpup plugin, I don't have the Backwpup options in Profile page...so am unable to add Backwpup admin privileges.

    I am happy to wait for a new version release to solve this problem, I will just postpone updates of the plugin on other sites until then.

    Thanks again for looking into this.

  5. Agiled
    Member
    Posted 1 year ago #

    thank you,
    but now this error is line 95 ;-)

  6. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi ashh115, Hi Agiled,

    your setup seams to be different. I cannot recreate your error. Can you send me the output of the following code ( send it to: r _dot_ windisch :at: inpsyde.com ). Don't publish it.

    replace
    $users = get_users( array( 'blog_id' => 1, 'role' => 'administrator' ) );
    with
    $users = get_users( array( 'blog_id' => 1, 'role' => 'administrator' ) );var_dump( $users );

    regards,
    Robert

  7. ashh115
    Member
    Posted 1 year ago #

    Email sent,

    Thanks

  8. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi ashh115,

    thank you for your email. Can you tell me your activated plugins? The Problem is that we use a API function from WordPress to get all admins. But this answer is different on your system. Maybe another plugin will change that.

    regards,
    Robert

  9. ashh115
    Member
    Posted 1 year ago #

    Hi Robert

    Below are the plugins which i have on the site. These are the ones that are consistant on both sites that I have tried and get the error on.

    All In One SEO Pack
    BackWPup (not activated as I get Fatal Error)
    Better WP Security
    Broken Link Checker
    Coming Soon Pages [Free]
    Contact Form 7
    Disable Comments
    Duplicate Post
    Google Analyticator
    Google XML Sitemaps
    WordPress Importer

    Other plugins that I have on the site that I sent you details for but not on the other site that I am also getting the error on are:

    Quick Cache
    Contact Form 7 Analytics by Found
    Cookie Control
    Brankic Social Media Widget
    Brankic Twitter Widget

  10. Agiled
    Member
    Posted 1 year ago #

    everything sent by email,
    thanks

  11. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    it seems that you are not using the current version of WordPress. Please replace the following code in the class-install.php:

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

    with:

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

    Then WordPress will also load the WP_User class on versions below 3.5.

    regards,
    Robert

  12. popwin8
    Member
    Posted 1 year ago #

    I install the latest version3.0.10 and have the same error.And replace

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

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

    then it can work.(wordpress version 3.3.1).
    thanks

  13. Caspar
    Member
    Plugin Author

    Posted 1 year ago #

    @popwin8 +1 for confirming, thanks!

  14. digia
    Member
    Posted 1 year ago #

    Change fixed the bug on version 3.4.2 as well! Thank you.

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

    with

    get_users( array( 'blog_id' => 1, 'role' => 'administrator', 'fields' => 'all_with_meta' ) );
  15. tabisurumishinten
    Member
    Posted 1 year ago #

    @digia

    Thanks a lot.
    I'm also using 3.4.2 as you.
    I have confirmed your solution.
    You saved my day!

  16. MarshaS
    Member
    Posted 1 year ago #

    I came over from the other thread. Just encountered this today.

    Sites are now offline as a result of this error so I can't get into it to update the user.

    http://writermarshastopa.com
    "Symfony" folder is already named with a capital S.
    Current version of WordPress

    This is a client's site and important I get it back up quickly:
    http://polaritycenter.com

    Thank you!
    Marsha

  17. MarshaS
    Member
    Posted 1 year ago #

    Went in through FTP and deleted the plugin.
    Would like to use, if new version fixes this bug.

  18. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Marsha,

    the bug with Symfony was fixed in 3.0.10. We will release the update 3.0.11 next week that will fix the add_role issue in version before WordPress 3.5.

    regards,
    Robert

  19. mcdonna
    Member
    Posted 1 year ago #

    Another site bitten by this ... new client and the idea was to do a backup before upgrading to the latest WP. Oops. Thanks for the fix.

  20. ashh115
    Member
    Posted 1 year ago #

    Sorry I have been away on holiday so have not been keeping up with this thread and havent had chance to play with the fixes above.

    Will keep an eye out for 3.0.11 as some of my sites can't be upgraded to 3.5 as theres issues with other plugins.

    Thanks

  21. Robert Windisch
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    we have released version 3.0.11 that will include the fix we have provided you for older WordPress versions. Please use this version and give us feedback if that will run on your version.

    regards,
    Robert

  22. MarshaS
    Member
    Posted 1 year ago #

    Thank you Robert.

    I installed it last night on http://psychicpsychology.org, linked it to S3 and tried to run a full backup. It timed out because of inactivity after 5 minutes. I tried three times, each with the same result.

    This is a current version of WordPress.

    Please advise.

    Thank you,
    Marsha

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.