Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#32458 closed defect (bug) (wontfix)

Upgrade Error

Reported by: ramiy's profile ramiy Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2.2
Component: Upgrade/Install Keywords:
Focuses: administration Cc:

Description

Error at the end of the upgrade process:

<# if ( data.suggestedWidth && data.suggestedHeight ) { #> <p class="suggested-dimensions"> <?php _e( 'Suggested image dimensions:' ); ?> {{data.suggestedWidth}} &times; {{data.suggestedHeight}} </p> <# } #>

Upgrade screenshot (hebrew install):
http://i.imgur.com/FAKez3z.png

Errror Source:
https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/media-template.php#L237

What is this code?

Change History (9)

#1 @dd32
9 years ago

What version were you updating from? 4.2.1?

That text shouldn't be displayed at all, so initially I thought it was a translation bug, but that seems unlikely.

#2 @ramiy
9 years ago

update from 4.2.2 to 4.2.2

#3 @dd32
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I can't duplicate this. If you can duplicate it with exact steps, please post the exact HTML source of that section of the updates page when you re-open.

The code you saw is part of the Media Library JS templates, which can be found here: wp-includs/media-template.php Line 235. I've got no idea how or why they were output there, and can only assume there was some kind of corruption of a file or something..

#4 @pavelevap
9 years ago

I noticed this problem also randomly with cs_CZ version... I have no screenshot, because I was redirected immediately after update, but there was strange (similar) code and it looks similar as attached screenshot...

#5 @ramiy
9 years ago

My client asked me what needs to be done?
She tried to upgrade plugins and she saw the error again.

@dd32, Do you want to get access to the site, to see the error?

#6 @dd32
9 years ago

  • Milestone set to Awaiting Review
  • Resolution worksforme deleted
  • Status changed from closed to reopened

re-opening based on the above.

Confusing indeed.. I'll try cs_CZ/he again a few more times.

In the meantime, @ramiy if you can verify it on a test install, I'd love to take a look - email me via https://dd32.id.au/contact-me/ or grab me on Slack.

#7 @ramiy
9 years ago

Sending on slack.

#8 @dd32
9 years ago

After looking at an example of this, it's kind of weird.

The media templates are being output on the page by a plugin, and the updater redirects before the page is fully loaded.
Because the page redirect occurs before the entire page is loaded, the page load is severed, and the contents of the partially loaded <script type="text/html"> gets output on the page as the redirect occurs.

Several fixes:

  1. Don't redirect, or redirect upon DOM ready instead
  2. Output a <div class="hidden">.. element last to hide all further output
  3. Plugins shouldn't enqueue stuff on all pages

The problem is that all 3 are not ideal, and don't provide a good UX.
We want to redirect the user ASAP, Outputting a div to hide all further output feels hacky, and we can't control plugins..

#9 @dd32
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

Many moons later, I'm marking this as wontfix.

The options for working around this are kind of hacky and in general isn't needed, except in this rare scenario.

Note: See TracTickets for help on using tickets.