Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#29054 closed defect (bug) (fixed)

Decrement of translation update count bubbles doesn't work, when updated through iframe

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

Source snippet from the iframe:

// ...
<script type="text/javascript">
	if ( window.postMessage && JSON ) {
		window.parent.postMessage( JSON.stringify( { action: "decrementUpdateCount", upgradeType: "plugin" } ), window.location.protocol + "//" + window.location.hostname );
	}
</script>
// ...
<div class="update-messages lp-show-latest">
	<h4>Updating translations for WordPress (ar)&#8230;</h4>
	// ...
</div>
<script type="text/javascript">
	(function( wp ) {
		if ( wp && wp.updates.decrementCount ) {
			wp.updates.decrementCount( "translation" );
		}
	})( window.wp );
</script>

The second one should use postMessage too.

Related: #17703

Attachments (1)

29054.patch (2.0 KB) - added by ocean90 10 years ago.

Download all attachments as: .zip

Change History (4)

@ocean90
10 years ago

#1 @ocean90
10 years ago

  • Keywords has-patch added; needs-patch removed

#2 @ocean90
10 years ago

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

In 29357:

Upgrader: Use always window.postMessage for decrement of update count bubbles when IFRAME_REQUEST is defined.
Fixes decrement of translation update count bubbles when updated through the bulk upgrader.

fixes #29054.

#3 @ocean90
10 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.