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
/
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3308792-2.patch | 1.19 KB | pfrenssen |
Comments
Comment #2
daften commentedComment #3
pfrenssenThanks 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.
Comment #4
pfrenssenComment #6
pfrenssenThis 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.
Comment #7
randalv commentedCan also confirm this bug.
Thank you for the patch, I've tested it on 2.0.5 and it works splendidly!
Changing to RTBC.
Comment #8
mkalkbrennerI consider that to be wrong configuration. Anyway, we should fix it.
Comment #11
mkalkbrennerI changed the name of the post update function before commit.
Comment #12
daften commentedMy apologies or not testing this issue, the fix looks good, thank you so much for picking this up! :)
Comment #14
tobiasbfacets_post_update_8001_8001_8001_8001_8001_8001_8001_8001_add_hierarchy_processorThe keyboard needs also holiday. :D