Skip to content

Conversation

@Adnan-cds
Copy link
Contributor

@Adnan-cds Adnan-cds commented Dec 8, 2023

The localgov_forms module registers the following themes:

  • localgov_forms_uk_address_lookup
  • localgov_forms_uk_address

So their preprocess functions should implement template_preprocess_HOOK() instead of MODULE_preprocess_HOOK(). Quoting relevant documentation:

template_preprocess_HOOK(&$variables): Should be implemented by the module that registers the theme hook, to set up default variables.

The localgov_forms module registers the following themes:
- localgov_forms_uk_address_lookup
- localgov_forms_uk_address

So their preprocess functions should implement template_process_HOOK().

Quoting the relevant documentation:
"template_preprocess_HOOK(&$variables): Should be implemented by the module that
registers the theme hook, to set up default variables."

@see https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/group/themeable/10#sec_preprocess_templates
Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @Adnan-cds :)

@Adnan-cds
Copy link
Contributor Author

Thanks. Merging. Credit goes to David @DavidBAsch for spotting the issue :)

@Adnan-cds Adnan-cds merged commit 200929e into 1.x Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants