[wp-trac] [WordPress Trac] #18408: Can't wp_reset_postdata after custom WP_Query in an admin edit page

WordPress Trac noreply at wordpress.org
Wed Feb 1 13:11:48 UTC 2017


#18408: Can't wp_reset_postdata after custom WP_Query in an admin edit page
-----------------------------------------------+---------------------------
 Reporter:  ericlewis                          |       Owner:  ericlewis
     Type:  defect (bug)                       |      Status:  reopened
 Priority:  normal                             |   Milestone:  Future
Component:  Query                              |  Release
 Severity:  normal                             |     Version:  4.7.2
 Keywords:  needs-testing ongoing needs-patch  |  Resolution:
                                               |     Focuses:
-----------------------------------------------+---------------------------
Changes (by quin452):

 * version:   => 4.7.2


Comment:

 Any idea about this?  I've encountered something similar.

 I'm trying to populate a metabox dropdown with the titles of a custom post
 type.
 The post which will hold this data is also a custom post type.

 It works fine not using wp_query and hard coding the options, but when I
 use wp_query, there are issues in saving.  It populates the dropdown, but
 the permalink is changed and the dropdown is reset/cannot be saved.  It
 also affects the title sometimes.

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


More information about the wp-trac mailing list