livehelperchat icon indicating copy to clipboard operation
livehelperchat copied to clipboard

Uncaught Type Error

Open bkonia opened this issue 5 years ago • 9 comments

I'm seeing the following JS error in the console, on every page of my site where the LHC widget appears:

Uncaught Type Error, cannot ready property 'style' of null at https://www.prescientrading.com/livehelperchat/index.php/en/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/1/(/theme)/1?r=%2F%2Fwww.prescientrading.com%2Fkb%2Fprescientrader-afl-functions%2F&l=%2F%2Fwww.prescientrading.com%2F:18:1981

It doesn't seem to affect anything, but of course, it's always concerning to see JS errors in the console.

bkonia avatar Oct 22 '19 21:10 bkonia

Hi @bkonia thanks for the report!

  • Are you able to find the same error on https://forum.livehelperchat.com/ ?
  • What version of PHP are you using?
  • What version of live helper chat are you using?

PeopleInside avatar Oct 22 '19 21:10 PeopleInside

No, I don't see the error on your site. I'm using PHP 7.3.7. I'm not sure of the LHC version, but I just downloaded it the other day, so I'm sure it's the latest version. You can view the error on my site at https://www.prescientrading.com. It shows up about 15 seconds after the page loads.

bkonia avatar Oct 22 '19 21:10 bkonia

Hi @bkonia thanks for writing back. The last version of live helper chat is the 3.25 you can check in the operator settings, update information.

At the moment this issue seems not to be related to live helper chat but the error in your website seems to be caused by your live helper chat instalaltion.

I can see in the error your website is showed as yourdomain:18 So you set something of "strange" in the LHC settings like do compiled the first two field on Misc settings page?

https://demo.livehelperchat.com/site_admin/chat/listchatconfig#!#misc SharedScreenshot

PeopleInside avatar Oct 22 '19 22:10 PeopleInside

Yes, I'm using 3.25. There's nothing strange in my Misc screen:

Domain: prescientrading.com HTTP Mode: https:

If you want, I could give you my LHC login info.

bkonia avatar Oct 22 '19 22:10 bkonia

TypeError more info about this error can be found here.

1

2

Umh i don't understand well about code :D as I'm not the programmer of the chat.

You can try to regenerate the mebed code. Have you edited it or just copied and pasted? I suggest to try also to visit https://htmledit.squarefree.com/ activate browser debug, paste your embed code. The Javascript error is still present?

Sorry but now where I'm (Italy) is late so I'm going to sleep. I will reply here as soon as possibile to every new message you will made.

I have live helper chat installed on my website, is installed on the live helper chat forum... at the moment I'm not able to reproduce this issue. See if you are able to understand what can be the issue.

Have you cusomized the theme of live helper chat i mean used the customtheme folder? Maybe try to make a test new installation with default setting and check if the mebed code generated give the same issue.

PeopleInside avatar Oct 22 '19 22:10 PeopleInside

Hi @bkonia yesterday with you i tried to put your widget embed code on https://htmledit.squarefree.com/ after activated browser debud. no errors so the issue can be related to your theme or where you placed the code. try to regenerate and replace the code.

I will close this issue for now as is not a live helper chat code issue. If the issue persist you can try to ask help on programing forum like stackoverflow.

I will be happy on hear your feedback and to know you was able to solve the issue. Have a great day!

PeopleInside avatar Oct 23 '19 09:10 PeopleInside

Your issue seems resolved, i cannot see anymore the error. Nice to see that.

PeopleInside avatar Oct 23 '19 09:10 PeopleInside

It's not really resolved. It's definitely a bug; I just disabled the feature that was causing it.

The problem is caused by the Need Help widget. The setTimeout function you highlighted in your screen shot attempts to set the CSS display attribute to inline-block, after a 15 second delay. The problem is, the widget only displays once per 24-hour period, but the JS code executes every time, so it's trying to set the display attribute of a non-existent object. If you enable the Need Help widget on your site, I'm sure you'll notice the same issue.

The developer needs to fix the code, so it only sets the display attribute when the widget is actually present.

bkonia avatar Oct 23 '19 15:10 bkonia

Assigned to @remdex

PeopleInside avatar Oct 23 '19 15:10 PeopleInside