[wp-trac] [WordPress Trac] #49132: Remove translation files when a plugin no longer exists
WordPress Trac
noreply at wordpress.org
Sun Jan 5 14:34:34 UTC 2020
#49132: Remove translation files when a plugin no longer exists
-------------------------+----------------------
Reporter: audrasjb | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: I18N | Version:
Severity: normal | Resolution: wontfix
Keywords: has-patch | Focuses:
-------------------------+----------------------
Comment (by audrasjb):
I understand your points, thank you I appreciate the detailed answer.
However, I'd like to have discuss some points to be sure we'll take the
best option.
Replying to [comment:6 ocean90]:
> If someone is deleting files directly they should know what they are
doing and are responsible for deleting all associated files. This may be
custom directories in the uploads directory, or, in this case, translation
files.
I'd say they could also assume that translations related to deleted plugin
would be deleted as well, since it's actually the case when they delete
the plugin in WP-Admin. In my opinion, there is a small inconsistency
here. It doesn't hurt very much (except we keep files that are not used
anymore in the installation), but it's still an inconsistency, and to be
honest I don't think we should make our decision based on the statement
that users have to delete those file by themselves :)
> * A plugin may only be temporary not available due to a
misconfiguration. There is no indication if a deletion was initiated by a
user unlike it's the case for #29860.
I understand this point and I share your thoughts, but this is why I added
a test on `plugin_not_found` error code. Do you think it's not sufficient
to consider the plugin has been deleted?
Translation files deletion doesn't hurt as a translation update will be
available if the plugin is put back in place.
> * `validate_active_plugins()` doesn't delete broken plugins, it only
deactivates them thus deleting something shouldn't be part of this
function.
Yes you're right, so maybe it would be better to add a specific function
to delete translations, outside of `validate_active_plugins`?
> * Neither options or other data is deleted when a broken plugin is
detected.
I kindly disagree on this point, as `validate_active_plugins` use
`deactivate_plugins` function which removes the plugin from
`active_plugins` site option. So the plugin data is actually deleted from
the plugin option, isn't it?
> * There's no harm in having the files still on server if someone has
forgotten to delete them.
I also disagree on this point, as it's always nice to remove unused and
useless files.
Once again, if it's a temporary deletion and the plugin is put back in
place, a translation update will be available, so there is no harm to
delete translation files when there a plugin isn't available anymore.
> * Therefore I'm going to close this as wontfix.
I'd like to keep it open to give some time to discuss the above points.
But be sure I'll be happy to close it after some discussion! Thanks for
your comprehension @ocean90 :-)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49132#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list