Problem/Motivation

Since the introduction of #2939710: Add support for "Search API (tags based)" caching in Views, hierarchical facets are broken. The complete logic was rewritten and a new (locked) processor was introduced, but it's not inserted into the existing facets on a site, so it's not used. This means all hierarchical facets are broken.

Steps to reproduce

* Create a facet using facets 2.0.2 or earlier.
* Make sure the facet is a hierarchical one, using a taxonomy reference, where the taxonomy uses a hierarchy
* Upgrade to 2.0.3 or more recent
* Check the facet, it doesn't show the hierarchy anymore

Proposed resolution

* Add an update hook to fix the facets or at minimum add instructions that all facets should be re-saved through the ui and exported.

Remaining tasks

* Create the update hook

User interface changes

/

API changes

/

Data model changes

/

CommentFileSizeAuthor
#3 3308792-2.patch1.19 KBpfrenssen

Comments

daften created an issue. See original summary.

daften’s picture

pfrenssen’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

Thanks for the report. I can confirm this bug. Here is an initial version of the update hook. I'm not sure if this only happens when using taxonomy references, or if there are other hierarchy types that are also affected.

pfrenssen’s picture

Title: Hierarchical facets broken » Hierarchical facets broken after updating to Facets 2.0.3

Status: Needs review » Needs work

The last submitted patch, 3: 3308792-2.patch, failed testing. View results

pfrenssen’s picture

Status: Needs work » Needs review

This was failing but not due to a change in the patch, we were testing on PHP 7.3 but Facets is only compatible with PHP 7.4+. Retesting on more modern PHP versions.

randalv’s picture

Status: Needs review » Reviewed & tested by the community

Can also confirm this bug.
Thank you for the patch, I've tested it on 2.0.5 and it works splendidly!

Changing to RTBC.

mkalkbrenner’s picture

I consider that to be wrong configuration. Anyway, we should fix it.

  • mkalkbrenner committed b043b32 on 2.0.x
    Issue #3308792 by pfrenssen, daften, RandalV, mkalkbrenner: Hierarchical...

  • mkalkbrenner committed 0453ca6 on 3.0.x
    Issue #3308792 by pfrenssen, daften, RandalV, mkalkbrenner: Hierarchical...
mkalkbrenner’s picture

Status: Reviewed & tested by the community » Fixed

I changed the name of the post update function before commit.

daften’s picture

My apologies or not testing this issue, the fix looks good, thank you so much for picking this up! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tobiasb’s picture

facets_post_update_8001_8001_8001_8001_8001_8001_8001_8001_add_hierarchy_processor

The keyboard needs also holiday. :D