[wp-trac] [WordPress Trac] #35077: Post featured image: image attributes not updated on the fly
WordPress Trac
noreply at wordpress.org
Mon Dec 14 15:31:41 UTC 2015
#35077: Post featured image: image attributes not updated on the fly
----------------------------+-----------------------------
Reporter: afercia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.4
Severity: normal | Keywords:
Focuses: ui, javascript |
----------------------------+-----------------------------
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).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35077>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list