Make WordPress Core

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's profile ocean90 Owned by: ocean90's profile 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.

Attachments (1)

29234.patch (466 bytes) - added by ocean90 10 years ago.

Download all attachments as: .zip

Change History (3)

@ocean90
10 years ago

#1 @dd32
10 years ago

  • Keywords commit added

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.

#2 @ocean90
10 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 29622:

Theme Upgrader: Set is_multi to true when doing bulk upgrades.

fixes #29234.

Note: See TracTickets for help on using tickets.