v20.8 facets issue with classnames

  • HaikoG
    Participant
    # 1 month ago

    I updated to 20.8 today but had to revert back to my previous version, because the facets/filter broke.
    The classnames of the facets (checkbox) no longer have spaces between them, resulting in them no longer being clickable and have no styling applied.

    So a facet now has the following class(es): wpsolr_facet_class_FAFC20D93D8FD5568D04E0C09B4EFF45wpsolr_facet_checkboxwpsolr_facet_skin_nonewpsolr_facet_product_cat_str wpsolr_facet_scroll

    Previous version was:
    wpsolr_facet_class_60131CD1E83FC40AD7EBA2C65A56E73D wpsolr_facet_checkbox wpsolr_facet_skin_none wpsolr_facet_pa_beeldschermdiagonaal_str wpsolr_facet_scroll

    wpsolr
    Keymaster
    # 1 month ago

    Here is an extract from facet class on https://www.wpsolr.com/wpsolr/search (WPSOLR 21.8):
    wpsolr_facet_class_C17187274AFF0A39A144307C73F8805D wpsolr_facet_radiobox wpsolr_facet_skin_none wpsolr_facet_type wpsolr_facet_scroll

    Do you have custom code interacting with facets?

    HaikoG
    Participant
    # 1 month ago

    We do have some custom code running, but turning that off did not change the behaviour. The only code interacting with the facets is

    add_filter( WPSOLR_Events::WPSOLR_FILTER_UPDATE_FACETS_DATA, ‘hg_filter_facet_items’, 10, 1);

    function hg_filter_facet_items($facets){
    // loop through array in array in array
    foreach ($facets as $fkey => $facet){
    if (is_array($facet)){
    foreach ($facet as $fikey => $facet_item){
    if (isset($facet_item[‘id’]) && $facet_item[‘id’] == ‘product_cat_str’){
    // get terms that are allowed to be filtered (hide customer specific categories)
    $show_terms = get_terms( ‘product_cat’, array(‘meta_key’ => ‘include_in_queryfilters’, ‘meta_value’ => 1) );
    foreach ($facet_item[‘items’] as $itemkey => $item){
    if (!in_array($item[‘value’], array_column($show_terms, ‘name’))){
    unset($facets[$fkey][$fikey][‘items’][$itemkey]);
    }
    }
    }
    }

    }
    }

    return $facets;
    }

    I’ll try turning off some other customizations

    HaikoG
    Participant
    # 4 weeks, 1 day ago

    It was resolved by disabling a SAML plugin. Not sure why though, but for now it is resolved.

    Thanks

    wpsolr
    Keymaster
    # 4 weeks, 1 day ago

    Thanks for the feedback.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.