Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#37774 closed defect (bug) (fixed)

Shiny Updates: Themes updates with no package available still show "Update now" link

Reported by: uglyrobot's profile uglyrobot Owned by: swissspidy's profile swissspidy
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.6
Component: Themes Keywords: has-ux-feedback has-patch commit
Focuses: administration Cc:

Description

The plugins list page gracefully handles the case when the package field is empty in the update_themes transient response by showing "Automatic update is unavailable for this plugin/theme." This is also shown correctly in Network Themes and when you open the theme details popover on a single site.

However in the themes.php grid it still shows the "update now" link which when you click will eventually show a "Update Failed: Update package not available." error. The grid needs to be adjusted to account for empty packages.

I know it's an obscure error, but it may be encountered when premium plugins/themes hook into the update process and rely on the empty package functionality until authorization is granted by entering a key or logging in, etc.

Attachments (6)

Manage_Themes_‹_Test_—_WordPress.png (108.2 KB) - added by uglyrobot 8 years ago.
Update now link
Manage_Themes_‹_Test_—_WordPress.2.png (630.2 KB) - added by uglyrobot 8 years ago.
37774.diff (1.6 KB) - added by tristangemus 7 years ago.
37774.2.diff (1.7 KB) - added by tristangemus 7 years ago.
Left $hasPackage undefined in some cases
37774.3.diff (1.6 KB) - added by swissspidy 7 years ago.
37774.4.diff (1015 bytes) - added by swissspidy 7 years ago.

Download all attachments as: .zip

Change History (19)

#1 @swissspidy
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.7

Thanks for reporting this! I think we should not show the "Update now" link at all in this case, without adding an additional explanation. The user will see it when opening the theme details modal and there's not enough space anyway.

#2 @karmatosed
8 years ago

  • Keywords has-ux-feedback added

+1 to not showing the "Update now" unless that is possible.

This ticket was mentioned in Slack in #core by stevenkword. View the logs.


7 years ago

@tristangemus
7 years ago

@tristangemus
7 years ago

Left $hasPackage undefined in some cases

#4 @tristangemus
7 years ago

Thoughts on #37774.2?

@swissspidy
7 years ago

#5 @swissspidy
7 years ago

  • Keywords has-patch commit added; needs-patch removed

@tristangemus Thanks for the patch! I simplified it a bit in 37774.3.diff. In it, I also made sure to still show the 'New version available.' message, just not the update button.

#6 @swissspidy
7 years ago

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

In 38788:

Themes: Do not show an update button if there's no update package.

This updates the list view to match the existing behaviour in the single theme modal.

Props tristangemus for initial patch.
Fixes #37774.

#7 @swissspidy
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

A bit late, but I just noticed two more issues:

  • The Ajax process still kicks in even if there's no update package
  • The server-side rendered message needs to be changed as well

@swissspidy
7 years ago

#8 @swissspidy
7 years ago

37774.4.diff fixes these two bugs.

#9 follow-up: @tristangemus
7 years ago

@swissspidy Thanks for jumping in, and good catch at the end!

Is it the best user experience to tell them there is an update with no action available? I don't have a better a better UX for this right now, but maybe someone can chime in regarding that?

#10 in reply to: ↑ 9 @uglyrobot
7 years ago

Replying to tristangemus:

@swissspidy Thanks for jumping in, and good catch at the end!

Is it the best user experience to tell them there is an update with no action available? I don't have a better a better UX for this right now, but maybe someone can chime in regarding that?

It's better to know for something that involves security. And it's been the core logic on all other notices for a very long time.

#11 @swissspidy
7 years ago

  • Keywords commit removed

Is it the best user experience to tell them there is an update with no action available? I don't have a better a better UX for this right now, but maybe someone can chime in regarding that?

It would be confusing not to show the notice in the list view when the update bubbles everywhere indicate available updates.

#12 @swissspidy
7 years ago

  • Keywords commit added

#13 @swissspidy
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 38855:

Themes: After [38788], further improve the update button when there's no update package.

Prevents running shiny install when no package exists.

Fixes #37774.

Note: See TracTickets for help on using tickets.