-
Notifications
You must be signed in to change notification settings - Fork 384
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
Allow removing all data on uninstall #3210
Comments
There's also the postmeta for controlling whether AMP is enabled for a given post. Is the checkbox necessary? Doesn't uninstallation entail data removal? I'm not up on the best practices for plugin uninstallation. |
A checkbox is common in many plugins as it prevents accidental data removal, for example when one wants to update a plugin via uploading a ZIP file. Because https://core.trac.wordpress.org/ticket/9757 is not solved yet, it would erase all data when deleting the AMP plugin and uploading the ZIP file of an RC. Which would be a bit annoying. |
I can't comprehend why this wasn't built into the plugin from the get go. When you guys implement this, please also consider taking care of redirects (301) required after removing all AMP content. You don't want to leave your users with potentially thousands of 404's. |
@cryptochrome What 404s are you referring to? Are you referring to The issue of |
@cryptochrome To redirect |
Something that comes to mind with this issue is that if someone wants to try a pre-release build of the AMP plugin, currently the way to do that is to download a pre-release ZIP, uninstall the AMP plugin, and install the pre-release AMP plugin to then activate. However, if the uninstall process deletes data, then this would not work anymore. |
@westonruter That‘s why I mention the checkbox. Uninstall would only run if the user enables it. |
This is fixed in WordPress 5.5. Updating via upload is now possible. Time to unblock? |
Yes, let's do it in v2.1. |
This needs an Implementation Brief or similar to that effect |
Implementation brief: Add an
We could also delete all transients associated with the plugin, when an external object cache is not being used. See also Uninstall Methods in the Plugin Handbook. |
Can you help me how to remove this data from my site, i have try to delete some table on my database without success, is there anyway we can use while we wait.. |
@amanijoseph87 This plugin does not create any database tables, at least not yet. Are you sure you're using this AMP plugin? |
Am using this plugin, even on board wizard display blank. |
@amanijoseph87 OK, please open a support topic on the forum. Our team will be able to better help you there: https://wordpress.org/support/plugin/amp/#new-topic-0 |
And settings page display blank too nothing seems to work |
Please check - https://wordpress.org/support/?post_type=topic&p=14395574 |
Is there a way to reset this plugin as delete all data related to this plugin |
That link takes me to a 404 page. Please open a topic here: https://wordpress.org/support/plugin/amp/#new-topic-0 We'll see it once you've posted it. Otherwise, you can follow the manual steps outlined in #3210 (comment) until we add an |
( https://wordpress.org/support/?post_type=topic&p=14395574 ) Is held for moderation i don't know way |
OK, we'll follow up with you there then. |
Please do now i know you guys a busy and if its not now i can not reach you in other time |
We'll continue this on the support forum. |
See how I initially tested during review in #6422 (review). |
Follow-up discussion on whether there should ba a mechanism for explicitly opting-in to deleting data: GoogleForCreators/web-stories-wp#8453 We could add a new option on the settings screen which is disabled by default to ”Delete all plugin data upon uninstallation“. This could be disabled by default if we want to be extra cautious. If a user uninstalls the plugin and finds the data wasn't removed, they could re-install and then enable that option and re-uninstall. Nevertheless, the data being removed (e.g. validated URLs) is much less important than the data being stored by Web Stories. |
QA passed: Only AMP-related data has been removed from database; no AMP-related data left in database after removal. Attaching "before.sql" and "after.sql" DB dumps that I used to compare: db-dumps.zip |
As reported in the forums: https://wordpress.org/support/topic/how-to-delete-plugin-including-data-left-behind/
When uninstalling the plugin, all the AMP options and custom post types are still in the database.
Suggestion:
register_uninstall_hook
oruninstall.php
to remove all custom post types, taxonomies, and options upon uninstall.The text was updated successfully, but these errors were encountered: