- π³π±Netherlands Web-Beest
I've got the same problem as well (in need of facets that can be disabled when needed). I've found one little issue in the code; when the facetblock is built, it returns an error because the facet is not active.
`Warning: Undefined array key "[facet_id]" in Drupal\facets\FacetManager\DefaultFacetManager->processBuild() (regel 323 van /app/web/modules/contrib/facets/src/FacetManager/DefaultFacetManager.php)`
This is due to the fact that the facet hasn't been built yet, but isn't available in the list of facets because it's not loaded. So I've added a check in FacetBlock::build that checks the facet status and returns an empty array if disabled.
- π³π±Netherlands Web-Beest
Fix for broken blocks. This patch lets the FacetManager load all the blocks (disabled or not) but disables the rendering of the block that uses that facet. This way you can configure the blocks for all facets, but select which block should be rendered by disabling the facet.
- Status changed to Needs work
9 months ago 1:26pm 10 April 2024 - πΊπΈUnited States smustgrave
Probably would be good to get test coverage for this one.