Using the drupal_block for a block that returns empty (in the case of Facets when the facet doesn't exist), throws an error because Facets returns an empty array. The drupalBlock method assumes that there is a #cache key even if the block is empty.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | twig_tweak-block-cache-check-2958571-6.patch | 440 bytes | prashant.c |
| #2 | twig_tweak-block-cache-check-2958571-1.patch | 473 bytes | elgordogrande |
Comments
Comment #2
elgordogrande commentedHere is a patch that includes the error check.
Comment #3
chi commentedIs empty string a valid value for
#cacheproperty? I propose we use empty array instead.Comment #4
fabianx commentedYes, needs to be an array.
Comment #5
alesbencina commentedIs this issue solved in twig_tweak 8.x-2.0?
Comment #6
prashant.c@elgordogrande
Thanks for the initial patch.
@Fabianx
Suggested change is done, please review.
Comment #8
chi commentedThanks.