Hot answers tagged

1 vote

Hook post update not found

Sounds like you want to run update hooks on a newly installed module. Then you should use deploy hooks. Other then update and post-update hooks they run also for newly installed modules. The only ...
  • 17k
1 vote

Attaching a library to only one custom module

You can't attach libraries from module info files. That only works for themes. And yes, if you attach in the page attachments hook without any other condition on the URL or whatever it will be added ...
  • 17k
1 vote
Accepted

Attaching a library to only one custom module

There's a few different ways of doing this, depending on how you're building /juniper. If you have a controller that is returning a render array, you can include something like $build['#attached']['...
1 vote
Accepted

Module template for a comment field is not triggering comment_preprocess_field

Use base hook, instead of base_hook (no underscore): function MODULE_theme() { return [ 'field__field_FIELD_NAME' => [ 'base hook' => 'field', ] ]; } That should invoke the ...
  • 165k

Only top scored, non community-wiki answers of a minimum length are eligible