Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#32779 closed defect (bug) (fixed)

Changes to captions aren't synced to the editor's gallery view

Reported by: ryan Owned by: iseulde
Priority: high Milestone: 4.3
Component: Editor Version: 4.3
Severity: normal Keywords: make-flow has-patch
Cc: Focuses: ui

Description

This was previously fixed in #31329. The bug is back.

See ​https://make.wordpress.org/flow/2015/02/05/caption-changes-are-not-reflected-in-the-editor-macnchrome-4-2-alpha-31332/

To reproduce, add a gallery without captions, click edit, add a caption to a photo, update and nothing changes. Updating the post will refresh the gallery and then the caption is visible.

Attachments (4)

32779.patch​ (2.3 KB ) - added by dmsnell 11 years ago.
Move rendering into getContent()
32779.2.patch​ (6.5 KB ) - added by iseulde 11 years ago.
32779.3.patch​ (5.1 KB ) - added by iseulde 11 years ago.
32779.4.patch​ (4.3 KB ) - added by iseulde 11 years ago.

Download all attachments as: .zip

Change History (16)

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


11 years ago

#2 @wonderboymusic
11 years ago

  • Owner set to iseulde
  • Status new → assigned

@dmsnell
11 years ago

Move rendering into getContent()

#3 @dmsnell
11 years ago

@iseulde: if you wouldn't mind reviewing this (32779.patch​) I would appreciate it. I'm not sure if overloading getContent() to do an initial render is the idiomatic way, but I came to that when attempting to prevent duplicating the code.

Also, sorry I stole your ticket - I'll look on the assigned-list in the future

#4 @dmsnell
11 years ago

  • Keywords has-patch dev-feedback added

#5 @iseulde
11 years ago

Ideally any change to captions in the media library should update all the gallery views in the editor. They're not stored in the shortcode, so we can't detect a change by looking at that. The best thing to do, I think, is when a gallery view is updated, destroy all instances and render everything again.

This ticket was mentioned in ​Slack in #core by jorbin. ​View the logs.


11 years ago

#7 @jorbin
11 years ago

  • Keywords needs-patch added; has-patch removed

This needs a patch that works as @iseulde outlines. This is a regression so we should get it fixed before release.

#8 @obenland
11 years ago

@iseulde, do you think you could take a stab at finding a fix here?

This ticket was mentioned in ​Slack in #core by obenland. ​View the logs.


11 years ago

#10 @iseulde
11 years ago

  • Keywords has-patch added; dev-feedback needs-patch removed

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


11 years ago

#12 @iseulde
11 years ago

  • Resolution → fixed
  • Status assigned → closed

In 33338:

TinyMCE: views: make sure gallery captions update

Part props dmsnell.
Fixes #32779.

Note: See TracTickets for help on using tickets.