Terms / objects link get lost for some cases.
-
After updating our install from 4.4.2 to 4.8.2, we observed the difference, where some terms were gone for some posts in some cases.
Might be related to https://core.trac.www.ads-software.com/ticket/37198
@boonebgorgesI was unable to get the same on stock WP install, but I hope someone could look into that and see some logic missing.
Around docroot/wp-includes/class-wp-term-query.php:813
There’s a code:
if ( ‘all’ === $_fields || ‘all_with_object_id’ === $_fields ) {
$terms = array_map( ‘get_term’, $terms );
}In some cases this code removes the object_id from Terms in this array.
I would guess that either it uses cache without object_id or just works on the combined array (some with fields=all and some with fileds=all_with_object_id)Not sure what this code was supposed to fix, but to make it work with our taxonomies and terms, we needed to disable it.
Maybe someone could help me understand what’s that code was supposed to fix and why it might be breaking our terms?
- The topic ‘Terms / objects link get lost for some cases.’ is closed to new replies.