[wp-trac] [WordPress Trac] #41373: WordPress 4.8 and WPML returns NULL on retrieve of translated slugname. Only ID works

WordPress Trac noreply at wordpress.org
Sat Sep 2 22:19:11 UTC 2017


#41373: WordPress 4.8 and WPML returns NULL on retrieve of translated slugname.
Only ID works
-------------------------------------------------+-------------------------
 Reporter:  BackuPs                              |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Taxonomy                             |  Review
 Severity:  normal                               |     Version:  4.8
 Keywords:  needs-testing needs-unit-tests       |  Resolution:
  reporter-feedback                              |     Focuses:
-------------------------------------------------+-------------------------

Comment (by adrianosilvaferreira):

 @BackuPs I may be wrong, but per my debugging it looks like it is not a
 problem with WP. Other plugins that modify term queries will need to do
 some workaround to fix that like I did.

 In WPML we modify term clauses queries in order to fix the query for
 translations. I had to avoid some of them when get_term_by is in the call
 stack.

 Basically WP from now on is getting term with get_terms when we add as
 field argument slug or name. For ID it works because get_term is called
 which calls a query directly returning ID we can filter.

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


More information about the wp-trac mailing list