Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#27363 closed defect (bug) (fixed)

Image editing is broken in the Edit Gallery modal workflow

Reported by: gcorne Owned by: 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

See http://wordpress.org/support/topic/39-beta-1-image-editing-in-created-gallery-nothing-found

Related to #21811

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

4 years ago

#1 @gcorne
4 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
4 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.

4 years ago

#4 @helen
4 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.