-
Notifications
You must be signed in to change notification settings - Fork 467
Should not run uninstall.php if another active installation is found #7444
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
Comments
@paulgoodchild Thanks for the report. However, I was not able to replicate this. I am able to have 2 copies installed and activate/deactivate one of them with no fatal errors. |
Thanks for getting back. It's not deactivate or activate, it's Delete. Only when you delete a deactivated plugin does it call Edit: Just fired up a quick test site to simply test this scenario according to the steps laid out above. Straight forward to reproduce for me on a new WP site. See image attached: |
I would say this will be easier once 3.0 is out as we have a more dynamic method of knowing if something is active. I'm going to punt to after 3.0 as I think it's a small use case, but something that will be more reliable on 3.0's codebase. |
Summary: I don't entirely trust WP's ability to wholly and correctly remove a plugin and install its upgrade from WordPress.org. Assuming WP itself doesn't fall over itself, anything can interrupt the upgrade process and leave a broken installation, which collapses the site.
So, I manually install the EDD upgrade in a separate folder and switch between the old and the new. If there's a problem, I switch back.
This means there are 2x installation of EDD on the site. One active, the other inactive.
After we're happy with the upgrade, the old version is uninstalled
Uninstalling the old version will call the plugin's
uninstall.php
script.Bug Report
Expected behavior
When I click to 'Delete' (i.e. uninstall) the EDD plugin, it should do so successfully and without error, when the plugin is also installed and active in another plugin folder.
Actual behavior
The plugin fails to delete.
A fatal error is produced:
PHP Fatal error: Cannot redeclare EDD() (previously declared in /public/wp-content/plugins/easy-digital-downloads/easy-digital-downloads.php:476) in /public/wp-content/plugins/easy-digital-downloads.old/easy-digital-downloads.php on line 476
Steps to reproduce the behavior
Information (if a specific version is affected):
EDD Version (or branch): 2.9.19
Any other relevant information:
There should be a check for
EDD()
and if it's declared (meaning EDD is active in another folder) theuninstall.php
process is exited and no further processing done.This check will also solve for the PHP Fatal error.
The text was updated successfully, but these errors were encountered: