lytics / pathforajs

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

Cannot read properties of undefined #621

Closed shindakun closed 1 year ago

shindakun commented 2 years ago

When trying to demonstrate an inline modal with targeting I found that I could not. I receive an error:

pathfora.min.js:formatted:493 Uncaught TypeError: Cannot read properties of undefined (reading 'data')
    at window.pathfora.no [as addCallback] (pathfora.min.js:formatted:493:23)
    at pathfora.min.js:formatted:2215:15
    at HTMLDocument.t (pathfora.min.js:formatted:234:13)

Spoke to @humanchimp around issue and it appears to be a bug.

Repro steps:

  1. Open new incognito window
  2. Open dev tools
  3. Visit https://alert-revolver.glitch.me/pathfora.html
  4. Note error in console
ashyablok commented 2 years ago

@shindakun One thing I noticed a bout the syntax here is that window.pathfora.initializeWidgets([modules]); should be window.pathfora.initializeWidgets(modules);

shindakun commented 2 years ago

@ashyablok good catch! Looks like the error message persists though :(

RaeEversmann commented 2 years ago

It looks like it is trying to call window.pathfora.initializeWidgets(modules) before all the resources are loaded.

RaeEversmann commented 1 year ago

Looking into this now see, https://lytics.slack.com/archives/CN5K3PQT1/p1685737814145719

RaeEversmann commented 1 year ago

also see https://github.com/lytics/jstag3/issues/199

RaeEversmann commented 1 year ago

This should be deployed, will close the issue once verified

RaeEversmann commented 1 year ago

@atodd-lytics Deploy is out, and it looks like the issue is fixed, can you check with the customer and let me know if they are still having issues?

smcmahon42 commented 1 year ago

@RaeEversmann I tested in incognito and the first loadEntity worked, after going to a second page the loadEntity hit an error.

Screenshot 2023-06-09 at 11 16 03 AM

RaeEversmann commented 1 year ago

@smcmahon42 This looks like a different error, can you open a new issue?