WordPress.org

Make WordPress Core

#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:

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 15 months ago.

Download all attachments as: .zip

Change History (5)

@gcorne15 months ago

comment:1 @gcorne15 months 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.

comment:2 @gcorne15 months ago

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

comment:3 @ircbot15 months ago

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

comment:4 @helen15 months 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.