By Roman-K on
Hi,
So subject is the question.
I have custom theme. There are two two hooks there (in mytheme.theme):
mytheme_preprocess_html() and mytheme_preprocess_node().
When I set $settings['cache']['bins']['render'] = 'cache.backend.null' - both hooks are working.
When I remove this setting - mytheme_preprocess_html() continues to work fine everytime, but mytheme_preprocess_node() works only one time on page reload after clearing cache.
Is it normal or how to get all hooks working all the time regardless of cache setting?
Comments
So no one knows? How do your
So no one knows? How do your hooks work then?
I've managed to put preprocessing node from theme to a module and I am having the same issue: preprocessing is fired just one time after cache cleared.
Wth?
Please, help me figure this out.
For anyone who will dig this
For anyone who will dig this trash in a future.
This disables hook caching.
Also notice double underscore in function name. No one states that such syntax should be used for this piece to work.
I confirm this works
Thanks, I suspected something similar and I confirmed it with your code.
Sometimes Drupal makes me ARRRGHH
Thanks, your solution works for me too. I love Drupal, but sometimes it makes me really mad.