-
Notifications
You must be signed in to change notification settings - Fork 53
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
Deactivating plugin makes images expand to 100% #178
Comments
Might be good f we start working on a tool that removes the markup which was inserted by the plugin. If it's not for when we switch to content filtering, then it can be used for cleanup after deactivating the plugin. I guess/hope a lot of the code from #148 can be used for this. Just have to make it remove |
A WP-CLI option would be great, but I wonder how many people will know how to make use of a CLI tool for this type of job? Another option would be to run the cleanup script ourselves through a plugin deactivation hook (https://codex.wordpress.org/Function_Reference/register_deactivation_hook). Either way, we'll need to carefully test any solution that edits people's content so we don't accidentally break things. |
I think this is our main priority for 3.2. |
Thinking a little more about this, now that Thoughts? |
I don't see how that changed the situation. If you used the plugin before version 2.5 you have a
I don't think we should make changes in core to fix a problem caused by this plugin. Specially not if it affects performance. We already had a discussion about whether or not to check if
I am also hesitant when it comes to making the plugin doing a database rewrite. That's why I was thinking that it might be better to use another plugin that is around for a while already and has positive reviews instead of writing our own code for this. My opinion is that it's a plugin's responsibility to leave things in the same state as it was before using it if someone disables the plugin. If it was just a harmless |
My late night brain was broken. Not sure what I was thinking here 😊.
That part is correct, and something that hadn't fully sunk in until I reread this ticket. Originally, I was thinking that everyone who turned off our plugin would be affected by this.
I think I agree, though I wonder if it would be beneficial for core to add
Let's work on an approach that can be as automatic as possible but requires users to take intentional action (e.g., click a confirmation button) before running any scripts against their database. |
Sounds good. Instead of telling people to use a search-replace plugin we could write the database rewrite script ourselves and ask the authors of those two plugins I linked to in my previous comment to review our code. |
Since we can only run one callback function upon plugin deactivation it's not possible to have users first make a backup and then run the code to remove |
An important issue was raised in the WP.org support forums, where turning off the plugin results in markup where a
srcset
attribute is present, but not asizes
attribute because we are adding adata-sizes
attribute instead and transforming those tosizes
attributes on the front end.This will no longer be an issue going forward once #177 lands, but we should provide documentation for folks who encounter this problem in the future.
The text was updated successfully, but these errors were encountered: