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.
gigya_init hook adds Gigya settings script inline incorrectly, by printing a JSON object inside a script tag inline as it is, which is invalide javascript behaviour, causing a browser error "Uncaught SyntaxError: Unexpected token :".
Gigya javascipt API documentation page on Global Conf JS does have two examples for how to set the global configuration object: Global Conf JS.
Comment | File | Size | Author |
---|---|---|---|
#1 | gigya_global_config_are-2534564-1.patch | 687 bytes | mkhamash |
Comments
Comment #1
mkhamash CreditAttribution: mkhamash at Vardot commentedI think adding the settings to window.__gigyaConf is the best option her, since we can't print the object inline inside an external script tag in Drupal.
Comment #2
pranavpathak CreditAttribution: pranavpathak as a volunteer commentedthanks @mkhamash.
I was also facing the same issue.
I used your patch and it is working fine for me.
Comment #3
Shiraz DindarConfirmed same issue and patch fixed it.
Comment #4
luciodiri CreditAttribution: luciodiri commentedAdded patch to dev stream.
Thank you @mkhamash, and thanks @pranavpathak & @Shiraz Dindar for the feedback.
Comment #6
FluxSauce CreditAttribution: FluxSauce as a volunteer commentedI just ran into this issue, given that this is a fatal JavaScript error, can you please release a new version?