Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2014-11-28 18:24:23

dpcomp
Member
Registered: 2014-11-28
Posts: 7

Undefined Field in Widget when apling new fields

Hi.

Would you guys please help me out?

I'm tring to use the chat with my site, which uses Joomla' CMS.
I don't know why, but if I try putting a custom field, it shows the field I customize + an undefined field right after it.
I don't know if it is a conflit with Joomla, with my language translation, with where I embed the code.

I'm using livehelper chat in the last version (2.13), with brazilian portuguese translation applied.
I embed the following code in Joomla's theme:

[== JavaScript ==]
<script type="text/javascript">
var LHCChatOptions = {};
LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:670,popup_width:500,domain:'MYDOMAIN.com.br'};

LHCChatOptions.attr = new Array();
LHCChatOptions.attr.push({'name':'field 1','value':'','type':'text','size':30});
LHCChatOptions.attr.push({'name':'field 2','value':'','type':'text','size':18});

(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var refferer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
po.src = '//chat.mydomain.com.br/index.php/site_admin/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/1/3/4/5/(theme)/3?r='+refferer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

It shows field 1, field 2 and a third undefined one.

I don't know what to do. Can anyone help me out, please?

I tried using the same script in a page without using Joomla, and it worked great.

Thanks.

Offline

#2 2014-11-28 19:52:50

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Undefined Field in Widget when apling new fields

Sorry but really no idea what's wrong...

Offline

#3 2014-12-02 14:05:49

dpcomp
Member
Registered: 2014-11-28
Posts: 7

Re: Undefined Field in Widget when apling new fields

remdex wrote:

Sorry but really no idea what's wrong...

Is there anything I could do to help you and the community to help me out? I only have a production website, but I might change it in order to show you some screenshots from the website, code generated, F12 debug, etc.

The problem seems to be in the array created by LHCChatOptions.attr, as it seems to be creating an empty index in the end. I don't know if there's something in javescript which makes this bugs, such as a conflict with Joomla ou my translation script.

Thanks in advanced

Offline

#4 2014-12-02 18:51:56

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Undefined Field in Widget when apling new fields

In my demo enviroment with your embed code i see everything as it should, so no way to help without personal look...

If you need a help, there is commercial support.

Offline

#5 2014-12-03 18:31:00

dpcomp
Member
Registered: 2014-11-28
Posts: 7

Re: Undefined Field in Widget when apling new fields

remdex wrote:

In my demo enviroment with your embed code i see everything as it should, so no way to help without personal look...

If you need a help, there is commercial support.

I see.
The problem is probably some conflict with Joomla.
I'll try finding more about it.

Thanks.

Offline

Board footer