-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue if separate plugins use PUC 2.0 and 2.2 on the same WordPress site #54
Comments
I did some more tests and found that if I outcomment the "non-versioned variants of the update checker classes" at the end of the class, both plugins work fine:
As my plugin is named "Maps Marker Pro", my PUC class is first loaded I guess and so when PUC for "UpDraftPlus" is loaded afterwards, the code above has already loaded PUC2.2 which breaks the PUC for UpdraftPlus - at least this is what I think happens. what would be your advice here, taking into account that multiple PUC instances with different versions might be active on a WordPress site? |
Are both plugins instantiating a specific version of PUC by using e.g. If both plugins explicitly ask for a specific version, there shouldn't be any conflicts (and if there are, then that's a bug in PUC). On the other hand, if a plugin uses the "give me the newest version" approach, then it must be prepared to actually support the newest version of PUC, and things may break if it does not.
Ah, it sounds like UpDraftPlus is using the old way to instantiate the update checker that didn't really allow for running multiple different versions at the same time. I should probably deprecate or remove those classes. In this case, removing that code from your copy of plugin-update-checker.php would probably be the easiest solution. |
Thanks for the prompt reply! You seem to be right - UpDraftPlus is using the following code to load PUC: while I am using
I will remove the "non-versioned variants of the update checker classes" from my PUC class as I do not use them within my plugin and those might only conflict with other plugins. |
Hi Yahnis,
I am using PUC 2.2 in my plugin Maps Marker Pro and a user reported an issue if the plugin UpDraftPlus is active, which uses PUC 2.0. When both plugins are active, the update check for UpDraftPlus shows the following errors when using the debug bar actions "request info" for metadata url:
Warning: The URL http://updraftplus.com/plugin-info/?installed_version=2.11.26.0&udm_action=updateinfo&sid=REPLACED&su=REPLACED&sn=REPLACED&slug=updraftplus&e=REPLACED&si=REPLACED does not point to a valid plugin metadata file. HTTP response code is 404 (expected: 200) in /wp-content/plugins/leaflet-maps-marker-pro/inc/class-plugin-update-checker.php on line 255
Failed to retrieve plugin info from the metadata URL.
If I deactivate Maps Marker Pro / PUC 2.2, the "request info" for metadata url works fine. Do you have any idea what might be causing this or how this could be solved? I guessed as our plugins use different PUC versions, there might not be any conflict?
thx for any help!
best,
Robert
The text was updated successfully, but these errors were encountered: