[wp-trac] [WordPress Trac] #39129: get_the_terms seems to be broken after upgrading to version 4.7

WordPress Trac noreply at wordpress.org
Wed Dec 7 15:13:32 UTC 2016


#39129: get_the_terms seems to be broken after upgrading to version 4.7
-------------------------------------+------------------------------
 Reporter:  kuphd1                   |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Taxonomy                 |     Version:  4.7
 Severity:  major                    |  Resolution:
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+------------------------------

Comment (by boonebgorges):

 In 4.7, the internals of `wp_get_object_terms()` were swapped out so that
 `get_terms()` is used, rather than a custom SQL query. So my hunch is that
 another plugin is interfering with general term queries in a way that is
 causing problems for `get_the_terms()`. @kuphd1 and @jonathan176, can you
 please look through your plugins and themes for anything that's filtering
 the following:

 - `terms_clauses`
 - `get_terms_args`
 - `get_terms`

 Another helpful debugging tool would be to inspect the SQL query being
 executed in `WP_Term_Query::get_terms()` (`$this->request`, assembled
 around line 664 of wp-includes/class-wp-term-query.php). At least in
 @jonathan176's case, something very odd is happening, and this will give
 some helpful hints.

 It may be necessary to disable your persistent cache (if you're running
 one) when debugging; many of these queries and filters are not run when
 Memcached etc is enabled. (On that note, a good starting place in
 debugging might be a simple cache flush.)

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


More information about the wp-trac mailing list