Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27363 closed defect (bug) (fixed)

Image editing is broken in the Edit Gallery modal workflow

Reported by: gcorne's profile gcorne Owned by: helen's profile helen
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords: has-patch commit
Focuses: javascript Cc:


When editing a gallery, if the user selects an image and clicks "edit image', the image editor doesn't load.

Instead, a lovely javascript error is thrown:

Uncaught TypeError: Cannot call method 'toJSON' of undefined


Related to #21811

Attachments (1)

27363-01.patch (2.4 KB) - added by gcorne 10 years ago.

Download all attachments as: .zip

Change History (5)

10 years ago

#1 @gcorne
10 years ago

  • Keywords has-patch commit added

This issue popped up because selectionSync.syncSelection() behaves differently when the selection supports multiple attachments. In 27363-01.patch, the approach is more direct. Instead of using syncSelection, the model needed for the image editor is set as an an attribute of the controller.EditImage state.

#2 @gcorne
10 years ago

A related issue was posted in the Alpha/Beta forum that is also fixed by attachment:27363-01.patch.

This ticket was mentioned in IRC in #wordpress-ui by gcorne. View the logs.

10 years ago

#4 @helen
10 years ago

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

In 27517:

Ensure the correct model is selected when editing an image from gallery mode. props gcorne. fixes #27363.

Note: See TracTickets for help on using tickets.