Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#35077 new defect (bug)

Post featured image: image attributes not updated on the fly

Reported by: afercia's profile afercia Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Media Keywords: needs-patch
Focuses: ui, javascript Cc:


Noticed while investigating on #35076.

When a post has a featured image, users can click the image to set a new featured image or edit the current one. When editing the current image attributes, changes are not reflected live in the UI after the image is inserted again.
To reproduce:

  • edit a post with a featured image
  • click on the featured image
  • in the media dialog, update the current featured image alt attribute
  • click the button "Set featured image"
  • check the featured image in your console inspector: the alt attribute is not updated

Looks like the AJAX action wp_ajax_set_post_thumbnail takes into account only the "set" and "delete" cases, there's nothing to handle an update.

Additionally, when removing a featured image and there's some error and the response is 0, WPRemoveThumbnail should trigger an alert with a message but setPostThumbnailL10n is undefined (the related set-post-thumbnail script is not enqueued at all, I'm guessing it was used in the old media uploader).

Change History (1)

#1 @joemcgill
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Confirmed that this is still the case in 4.5.

Note: See TracTickets for help on using tickets.