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.
When not logged in, with a login block on the front page I am getting the error:
Notice: Undefined variable: login_div in include() (line 18 of /home/elijah/websites/loc.example.com/docroot/profiles/all/modules/contrib/gigya/theme/gigya-login-block.tpl.php).
I searched the code base and it does appear that /gigya-login-block.tpl.php is calling for a variable that never gets defined. Is it just not definied or is it calling the wrong variable?
Comment | File | Size | Author |
---|---|---|---|
#7 | gigya_UndefinedVariableLoginDiv_2149087-2.patch | 395 bytes | richburke |
#3 | gigya_UndefinedVariableLoginDiv_2149087-1.patch | 482 bytes | richburke |
Comments
Comment #1
Elijah LynnComment #2
richburke CreditAttribution: richburke commentedBelow please find a patch that addresses this issue.
The issue, by the way, is caused by the fact that "login_div" is initialized only conditionally, but it's used even when the Gigya component isn't enabled.
Comment #3
richburke CreditAttribution: richburke commentedComment #4
Elijah LynnComment #5
Elijah LynnThis patch won't apply because it isn't relative to the module directory. Make the patch again within the Gigya module directory and use the --relative option, e.g.
git diff --relative
Comment #6
Elijah LynnComment #7
richburke CreditAttribution: richburke commentedOopsie. Thanks for pointing that out Elijah. A new patch is attached.
Comment #8
Elijah LynnWorks!
Thanks Rich
Comment #9
Elijah LynnI revisited this patch as part of an upgrade we are doing from 7.x-4.4 to 4.6 and it isn't throwing the error anymore without the patch applied.
It appears that _gigya_is_component_enabled('login') returns TRUE because the variable gigya_login_enabled is not actually set anywhere but we had it set to 0 in a Feature.
Did this variable gigya_login_enabled ever exist and was removed?
Comment #10
Elijah LynnOn further thought, let's mark this as Works as designed. Nobody else commented on this in over a year and that means it is unlikely anyone has had this issue.