Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Terms / objects link get lost for some cases.

Discussion in 'Misc WordPress Requests' started by RomSocial, Oct 20, 2017.

  1. RomSocial

    Guest

    Terms / objects link get lost for some cases., by RomSocial

    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.wordpress.org/ticket/37198
    @boonebgorges

    I 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?

    Terms / objects link get lost for some cases.
     
    #1

Share This Page

Web Hosting