[wp-trac] [WordPress Trac] #31742: Customizer: use attachment ID to show current header
WordPress Trac
noreply at wordpress.org
Wed Apr 8 21:09:06 UTC 2015
#31742: Customizer: use attachment ID to show current header
--------------------------+------------------------
Reporter: sirbrillig | Owner: ocean90
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.2
Component: Customize | Version: 3.9
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------
Comment (by sirbrillig):
To simulate a case where this patch would prevent an issue, we can use a
similar technique as reproducing #31786:
Using the Customizer's Header Image Control, upload two images with the
same name on two different months (since images are organized by YYYY/MM)
and then open the Customizer's Header Image Control. You would expect to
see both images, but only one will be shown in the list of uploaded images
below.
For example, if one image has the URL 2015/02/my-image.png and a second
has the URL 2015/03/my-image.png only the second image will be shown.
Then we just need to set the current image to the uploaded image which
does not show up in the list. My technique to do this is contrived, but a
real-world situation might be if the file system backend caused the URL of
the current image not to match the URL of the image in the uploaded list
(as was previously the case on WP.com).
To fake this, apply the patch in #31786 and reload the Customizer. You'll
see the previously hidden image is now visible in the list. Select it and
save the Customizer. Then remove the patch from #31786 so the image is
hidden again.
When the Customizer is reloaded, it will read "No image set", when in fact
an image is set that just isn't visible in the list below it.
Applying 31742.5.diff in that situation will cause the fallback to fire
and the correct image will be shown.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31742#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list