- Issue created by @w01f
- π³π±Netherlands johnv
Thanks, fixed in #3514956-8: Introduce Hook classes (as per D11.1) β . Will create a new release in a minute.
After upgrading the languagefield module beyond version 1.11 (tested on 1.12 and 1.13), our site encounters a white screen of death (WSOD) on every page load. The error log shows the following message:
ArgumentCountError: Too few arguments to function Drupal\languagefield\Hook\CustomLanguageHooks::tokenInfo(), 0 passed and exactly 5 expected in Drupal\languagefield\Hook\CustomLanguageHooks->tokenInfo() (line 49 of .../languagefield/src/Hook/CustomLanguageHooks.php).
It appears that the Token module is invoking the tokenInfo() hook without any arguments, while the implementation in languagefield now requires five arguments. This discrepancy causes a fatal error and halts page rendering.
The tokenInfo() hook should be compatible with how the Token module calls hook implementations (i.e., without parameters) or otherwise handle the scenario gracefully. This will prevent the WSOD and ensure proper token processing.
For now, downgrading to languagefield version 1.11 resolves the issue.
Active
1.12
Code
Thanks, fixed in #3514956-8: Introduce Hook classes (as per D11.1) β . Will create a new release in a minute.