"Cannot read properties of null (reading 'replace')" error on public page

leahdany
Giga Guru

I have a public record producer on a public portal. When I go to the portal as an authenticated user, I don't get the same error in the browser console as I do when I'm an unauthenticated user. The error reads "Cannot read properties of null (reading 'replace')". The error prevents the unauthenticated user from seeing the Address Verification window, and submitting the form. I've already looked in the client scripts and script include that is being called. The "replace" function isn't in there. There are no other client scripts so this one has to be the one causing the issue. I just don't know where.

For reference, I installed this integration pack to validate the address. If you look in the Update Set Preview, you'll see the script include and two client scripts. I cannot find where the error is coming from.

Authenticated user sees:

find_real_file.png

Unauthenticated user sees:

find_real_file.png

3 REPLIES 3

Anil Lande
Kilo Patron

Hi,

Can you please check client scripts and GlideAjax scripts. put logs to trace your script and see where it is failing. The error is for GlideAjax so check where exactly it is used.

I guess your script include is not returning expected result.

 

Thanks,
Anil Lande 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

The error is only returning when the user is unauthenticated. It runs normally else wise. The logs haven’t shown anything.

Aman Kumar S
Kilo Patron

Hey,

Can you check if your page the you are rendering as pop-up, if it set as public or not in sys_public table

Best Regards
Aman Kumar