lytics / pathforajs

Web personalization SDK
https://www.lytics.com/
MIT License
2 stars 0 forks source link

[BUG] Text only gated modal error #617

Closed shindakun closed 2 years ago

shindakun commented 3 years ago

It appears a bug may have snuck into text only gated modals. Trying to deploy a modal following the example leads to an error in the console and no modal being displayed.

var module = new pathfora.SiteGate({
  id: 'gate-hide-form',
  headline: 'Gated Site Feature',
  msg: 'Please agree to the terms to proceed.',
  showForm: false,
  okMessage: 'I Agree'
});

pathfora.initializeWidgets([module]);

The error is:

pathfora.min.js:formatted:1353 Uncaught Error: TypeError: Cannot read properties of null (reading 'setAttribute')
    at t (pathfora.min.js:formatted:1353)
    at Ao (pathfora.min.js:formatted:1414)
    at window.pathfora.Vo [as initializeWidget] (pathfora.min.js:formatted:1982)
    at pathfora.min.js:formatted:1666
    at Oo (pathfora.min.js:formatted:1646)
    at pathfora.min.js:formatted:1665
    at Po (pathfora.min.js:formatted:1538)
    at p (pathfora.min.js:formatted:1664)
    at window.pathfora.xo [as initializeWidgetArray] (pathfora.min.js:formatted:1677)
    at window.pathfora.Bo [as initializeWidgets] (pathfora.min.js:formatted:1520)

You can see this in action in the example from the docs http://lytics.github.io/pathforadocs/examples/preview/types/gate/showForm.html

shindakun commented 3 years ago

cc: @ashyablok

dhardingo commented 3 years ago

Hi @shindakun do you know what the impact of this one is / severity?

shindakun commented 3 years ago

@daveythesaint I'd say sev 2

ashyablok commented 3 years ago

@daveythesaint I'm gonna bump this to next up to include on next sprint. This is actually pretty nasty. :grimacing:

dannafziger commented 2 years ago

@ashyablok where does this sit? Yamaha has been holding on launching a campaign so a status update would be great

jarvismak commented 2 years ago

@kgruenef to follow up with Ash