WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#31601 closed defect (bug) (fixed)

Images added to a gallery via the "Add to Gallery" flow are forgotten by the media modal

Reported by: ryan Owned by: azaozz
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.2
Component: Media Keywords: has-patch
Focuses: javascript Cc:

Description

Every image added after you click Add to Gallery is forgotten by the media modal once it is dismissed. The embed in the editor shows the gallery correctly, but when you edit the gallery the modal opens sans added images.

In post-new.php, add a gallery to a post. Then,

  • Click the gallery
  • Click the pencil icon
  • Click Add to Gallery
  • Click to select an image
  • Click Add to Gallery
  • Note that the added image shows correctly in Edit Gallery
  • Click Update Gallery
  • Note that the added image shows correctly in the editor
  • Click the pencil icon
  • Note that the added image is not shown
  • Click Update gallery
  • Note that the image is now gone from the editor

Attachments (1)

31601.patch (714 bytes) - added by iseulde 3 years ago.

Download all attachments as: .zip

Change History (6)

This ticket was mentioned in Slack in #core-editor by boren. View the logs.


3 years ago

#3 @iseulde
3 years ago

  • Focuses javascript added

Will look into this.

@iseulde
3 years ago

#4 @iseulde
3 years ago

  • Keywords has-patch added

#5 @azaozz
3 years ago

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

In 31731:

TinyMCE wpViews: use the real attribute value instead of the cached jQuery data. Fixes updating of the wpView text strings.
Props iseulde. Fixes #31601.

Note: See TracTickets for help on using tickets.