[Beehive Pro] BackupBuddy, BeeHive Pro conflict

I have many sites where BackupBuddy will not connect to remote destination (Google) and gives the error “This site is experiencing difficulties”. This has probably only started in the last 1-2 weeks.

In all cases if I disable Beehive Pro the remote destinations start working again.

So we have a conflict. I suspect that it has come with your upgrade. I do not know if you or they need to fix the problem. I will post this query with their support also.

Regards
Drew

  • Drew
    • WPMU DEV Initiate

    Ok here is the iThemes reply. I understand their point, but I suspect in the end it is going to mean one of you is going to have to go. It’s very annoying.

    Drew

    Jeremy Trask (iThemes Support)

    Oct 31, 07:07 CDT

    Hi Drew

    BackupBuddy is using an older version of the 3rd party library but this is perfectly legitimate.

    The root cause of the overall issue (conflicts between plugins legitimately using different versions of 3rd party libraries) is two-fold really. Firstly, neither WordPress nor PHP provides any mechanism for the simultaneous loading and use of different versions of the same library; and secondly, in such cases a plugin that interferes with the operation of another plugin is doing so because it is loading the library that it wants even in the situation where it is not the plugin that is being called upon to perform any function.

    From your description and that of the Beehive Pro pluign support it sounds like the Beehive Pro plugin is “speculatively” loading the 3rd party library just on plugin initialisation rather than in the situation where it is actually the plugin being called upon to take some action and tat particular action actually requires the use of the library.

    In contrast, BackupBuddy will only load the library when it is the plugin being called upon to perform an action and that action requies the use of the library.

    Following this approach is really the only way by which plugins can use the same library.

    Note that “sharing” a lbrary is also not a viable approach for a few reasons. Plugins are developed and tested against specific versions of 3rd party libraries and even if an API might look the same across multiple versions of a library that does not mean to say it is, theer may be different behaviours or in fact a plugin may have had to include a workaround for a library issue that would cause problems with another version of the library. It is also the case that you canot be sure that a 3rd party library from an unknwn source is actually as it is claimed to be – the only 3rd party libraries from another source that can safely be used are those delivered by WordPress Core.

    There is one corner case where problems can still arise even if the proper approach to the use of 3rd party libaries is followed but this is quite rare.

    The best solution for you is for the Beehive Pro plugin deveopers to make sure that any 3rd party libraries are only loaded when the plugin is the the plugin being called upon to perform an action and that action requires the use of that library. This is also more effciient in resource and performance terms as well as no code is being loaded and no memory being used that is not actully required.

    Regards…jeremy

  • Patrick Freitas
    • FLS

    Hi Drew

    Thank you for the update.

    Can you forward us some information for any site that you are having the problem and we can run some more tests?

    Note: Don’t leave your login details in this ticket.

    Instead, you can send us your details using our contact form https://wpmudev.com/contact/#i-have-a-different-question:

    Subject: “Attn: Patrick Freitas”

    – Site login URL:

    – WordPress admin username:
    – WordPress admin password:

    – FTP/SFTP credentials

    Host:
    Username:
    Password:
    Port:

    – cPanel credentials

    Host:
    Username:
    Password:

    – Folder path to the site in question:

    – Link back to this thread for reference

    – Any other relevant URLs/info:

    Please, reply to the ticket once you have sent the information.
    Best Regards
    Patrick Freitas

  • Patrick Freitas
    • FLS

    Hi Drew

    Thank you for the credentials.

    I was able to replicate the problem on my end, I can see the fatal error on Log

    PHP Fatal error: Cannot declare class Google_Client, because the name is already in use in /var/web/site/public_html/wp-content/plugins/backupbuddy/destinations/gdrive/Google/Client.php on line 37

    This should be due the old library from BackupBuddy, however, I will be escalating this to our plugin developer for a closer look.

    Best Regards
    Patrick Freitas