Opened 10 years ago
Closed 10 years ago
#29425 closed defect (bug) (fixed)
Plugin update: Translation update fails with "Invalid Data provided"
Reported by: | pavelevap | Owned by: | dd32 |
---|---|---|---|
Milestone: | 4.0 | Priority: | highest omg bbq |
Severity: | blocker | Version: | 3.7 |
Component: | I18N | Keywords: | has-patch commit dev-reviewed |
Focuses: | Cc: |
Description
When updating plugin from Plugins screen, there is following message: "Invalid Data provided." during automatic language packs update. When updating the same plugin through Dashboard - Updates, then everything works.
Attachments (3)
Change History (12)
#2
@
10 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.0
The message comes from Plugin_Upgrader::deactivate_plugin_before_upgrade() where $plugin['plugin']
is empty.
29425.patch goes the same, drastic way as [29621].
#4
@
10 years ago
- Summary changed from Language updates problem from Plugins page to Plugin update: Translation update fails with "Invalid Data provided"
#5
@
10 years ago
- Priority changed from normal to highest omg bbq
- Severity changed from normal to blocker
#6
@
10 years ago
Four filters are used:
- upgrader_source_selection handled by [29621]
- upgrader_pre_install handled by 29425.patch
- upgrader_clear_destination used to delete old plugins prior to plugin install. Should be cleared too IMHO.
- upgrader_post_install used for parent theme installs. No idea if this will cause issues, but might as well clear it too?
#7
@
10 years ago
upgrader_pre_install handled by 29425.patch
All testing shows that this is indeed a problem, and the patch indeed does fix it. I can't find anything wrong with it.
upgrader_clear_destination used to delete old plugins prior to plugin install.
This one isn't triggered as 'clear_destination' is set to false in the Translation update call.
upgrader_post_install used for parent theme installs. No idea if this will cause issues, but might as well clear it too?
The Theme_Upgrader::check_parent_theme_filter
method gets called for the Translation update, but it passes in the event the parent theme has been installed, Ideally this shouldn't be run, as although it degrades gracefully for me, I can't say it'll always be so.
When you take the above into account with someone using a customer upgrader in a premium theme or similar, we can't trust anything hooked to these filters, so we should just blow them all away IMHO. 29425.diff does just that.
Might be related to #29230.