[wp-trac] [WordPress Trac] #41857: Walker_PageDropdown doesn't set correct selected value when using value_field
WordPress Trac
noreply at wordpress.org
Wed Sep 13 03:24:09 UTC 2017
#41857: Walker_PageDropdown doesn't set correct selected value when using
value_field
-------------------------------+------------------------------
Reporter: it4life | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.8.1
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+------------------------------
Comment (by it4life):
Replying to [comment:1 birgire]:
> Welcome to WordPress Trac, @it4life
>
> Can you give an example?
>
> Not all fields have unique values, like {{{ID}}} and {{{post_name}}}.
>
> How should non-unique fields be handled?
>
> If the first match is selected, then that would depend on the order -
that might be problematic.
>
Yes, an example is using with `value_field` = `post_name` and it doesn't
show selected value, as you see the code is only checking selected value
by `ID`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41857#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list