Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#27363 closed defect (bug) (fixed)

Image editing is broken in the Edit Gallery modal workflow

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

Description

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 13 years ago.

Download all attachments as: .zip

Change History (5)

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


13 years ago

#4 @helen
13 years ago

  • Owner set to helen
  • Resolution → fixed
  • Status new → 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.