Opened 10 years ago
Closed 10 years ago
#29234 closed defect (bug) (fixed)
Translation update runs multiple times when doing bulk upgrade for themes
Reported by: | ocean90 | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Upgrade/Install | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
I added some log output to Language_Pack_Upgrader::async_upgrade() and these are the results:
With one theme:
First run: https://gist.github.com/ocean90/39461005c6088ecd67b5
Second run: https://gist.github.com/ocean90/aa63c0f8ad5fdbb979eb
With two themes:
First run: https://gist.github.com/ocean90/586e56a265d84e363417
Second run: https://gist.github.com/ocean90/2648dff4da960610a4c6
Third run: https://gist.github.com/ocean90/8052a9ee88c31299b660
Plugin for comparison: https://gist.github.com/ocean90/999c6ee0bab6431cfa3d
So the do_action for upgrader_process_complete
in WP_Upgrader::run() is the reason for this. But this is only called when $options['is_multi']
is false. For plugin bulk updates is_multi
is set to true. For themes not and currently I have no idea why, maybe dd32 can weigh in here.
Attached patch sets is_multi to true for themes.
Seems pretty straight forward, I can't see any reason why this change would cause a problem.
It looks like it was simply missed when bulk theme updates were added.