Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37285 closed defect (bug) (fixed)

Shiny Updates: Cancelling the filesystem credentials prevents updating themes unless you reload

Reported by: davidanderson's profile DavidAnderson Owned by: swissspidy's profile swissspidy
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.6
Component: Upgrade/Install Keywords: has-patch commit
Focuses: javascript Cc:


Running on the latest nightly: 4.6-beta1-37961

Reproducible: every time

Steps to reproduce:

1) Set up WordPress, and set permissions to that the 'filesystem credentials' dialog will be required when performing theme updates.

2) Go to /wp-admin/themes.php

3) Click on "Update now". The filesystem credentials dialog should open. "Update now" will turn to "Updating..."

4) Close the filesystem credentials dialog. "Updating..." will return to "Update now".

5) Click again on "Update now".

Result: nothing happens.
Excepted result: filesystem credentials dialog should open again. You can only get it back by reloading the page.

Looking at the code, it seems that the initial click cancels all listeners with .off() - and they are never registered again.

Attachments (1)

37285.diff (407 bytes) - added by swissspidy 8 years ago.

Download all attachments as: .zip

Change History (9)

#1 @ocean90
8 years ago

  • Focuses javascript added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.6
  • Summary changed from Shiny Updates: (bug): cancelling the filesystem credentials prevents updating unless you reload to Shiny Updates: Cancelling the filesystem credentials prevents updating themes unless you reload

Confirmed, doesn't happen for plugins.

8 years ago

#2 @swissspidy
8 years ago

  • Keywords has-patch added; needs-patch removed

I don't know why this was added, but I didn't encounter any problems after removing the this.$ 'click', '.update-message' ); line.

#3 @swissspidy
8 years ago

@DavidAnderson Can you confirm whether 37285.diff solves the issue? Thanks!

#4 @DavidAnderson
8 years ago

@swissspidy : I think so, but I'm puzzled by a problem that turned up in testing of our plugin, and then seemed to just vanish without any obvious reason. So, I'm going to test it further tomorrow and get back to you.

#5 @DavidAnderson
8 years ago

Further testing has turned up no problems. All seems well.

#6 @swissspidy
8 years ago

  • Keywords commit added

#7 @swissspidy
8 years ago

  • Owner set to swissspidy
  • Status changed from new to assigned

#8 @swissspidy
8 years ago

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

In 38019:

Upgrade/Install: Do not remove event handlers when trying to update a theme.

Previously, when clicking "Update now" the callbacks were erroneously removed. This prevented opening the filesystem credentials modal for a second time.

Fixes #37285.

Note: See TracTickets for help on using tickets.