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.

CommentFileSizeAuthor
#1 gigya_global_config_are-2534564-1.patch687 bytesmkhamash
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkhamash’s picture

Status: Active » Needs review
FileSize
687 bytes

I 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.

pranavpathak’s picture

thanks @mkhamash.
I was also facing the same issue.
I used your patch and it is working fine for me.

Shiraz Dindar’s picture

Confirmed same issue and patch fixed it.

luciodiri’s picture

Status: Needs review » Fixed

Added patch to dev stream.
Thank you @mkhamash, and thanks @pranavpathak & @Shiraz Dindar for the feedback.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

FluxSauce’s picture

Priority: Normal » Major

I just ran into this issue, given that this is a fatal JavaScript error, can you please release a new version?