[wp-trac] [WordPress Trac] #37697: Strange behavior with thumbnails on preview in 4.6

WordPress Trac noreply at wordpress.org
Wed Aug 17 21:25:11 UTC 2016


#37697: Strange behavior with thumbnails on preview in 4.6
-----------------------------+------------------------
 Reporter:  jbenton          |       Owner:  joemcgill
     Type:  defect (bug)     |      Status:  accepted
 Priority:  high             |   Milestone:  4.6.1
Component:  Post Thumbnails  |     Version:  4.6
 Severity:  normal           |  Resolution:
 Keywords:  needs-testing    |     Focuses:
-----------------------------+------------------------
Changes (by joemcgill):

 * keywords:  needs-patch needs-unit-tests => needs-testing
 * milestone:  Awaiting Review => 4.6.1


Comment:

 @jbenton Thanks for the ticket. I noticed this bug at almost the same time
 you did, I think. The issue is that the new
 `_wp_preview_post_thumbnail_filter()` function fails to check if the
 `$post_id` is from the post we're previewing, so it can affect any
 secondary loops on the preview page.

 [attachment:37697.diff] adds an additional check to make sure we're only
 affecting the main post object from the preview page and updates the unit
 test for this function so it includes the check as well.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37697#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list