Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There is no need for the current variable_set of the page title in the hook_install() implementation. Having this variable set in the hook_install can cause some problems with Features, as a feature that sets search 404 as a module dependency and also exports that variable to code will have the value immediately overridden, requiring a second features revert during deployment.
Comment | File | Size | Author |
---|---|---|---|
#1 | search404-1964760-1-remove-vset.patch | 693 bytes | e0ipso |
Comments
Comment #1
e0ipsoIt is safe to just remove the variable_set since the default value si passed along with variable_get all times.
variable_get('search404_page_title', t('Page not found'))
Comment #2
q0rban CreditAttribution: q0rban commentedComment #3
KrisBulman CreditAttribution: KrisBulman commentedI ran into this problem when strongarming vars under a feature, the title var would always get overridden by the default value set in hook_install. This patch resolved the matter.
Comment #4
zyxware CreditAttribution: zyxware commented@q0rban - Thanks for the report. @e0ipso - Thanks for the patch. The patch has been applied to the 7.x-1.x branch and should be present in the next release.
Comment #5.0
(not verified) CreditAttribution: commentedUpdating description to match title.