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

You are not logged in.

Announcement

#1 2015-07-27 09:02:38

Robotics445
Member
Registered: 2014-02-25
Posts: 64

Page Embed Problems

Hello!
Our page embed code has suddenly stopped working, with no changes prior at our end:

http://prntscr.com/7w4puj

Our code is:

[== Undefined ==]
<h3>Professional help for your loved one is available. Ask an addiction specialist now...</h3>
<div id="lhc_status_container_page"></div>
<script type="text/javascript">// <![CDATA[
var LHCChatOptionsPage = {}; 
LHCChatOptionsPage.opt = {};
function trackOffline() {
var po = document.createElement('script');
po.type = 'text/javascript'; po.async = true;
po.src = 'http://a.pixeltrax.net/px/?c=1f5b3e5a49d6c59';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
}
LHCChatOptionsPage.callback = {
online_chat_started_cb : function(inst) {
_gaq.push(['_trackEvent', 'LiveHelperChat', 'OnlineChatStartedPage', 'started']);
    // Online chat started
 trackOffline();
},    
offline_request_cb:function(inst) {
_gaq.push(['_trackEvent', 'LiveHelperChat', 'OfflineChatStartedPage', 'offline_send']);
    // Offline request was send
trackOffline();
}};
(function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = '//abbeycarefoundation.com/livechat/index.php/chat/getstatusembed/(leaveamessage)/true'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();
// ]]></script>

...Remdex actually did this for us custom, to include the event tracking parameters.

Now, the standard page embed code from the config screen works just fine.

And, we have another site which uses this modified code, which has also stopped working:

http://prntscr.com/7xhaj0

Our host tells us there may have been a wordpress issue that needs a fix:

We have had a few reports of the same problem with WordPress based sites and them blocking the loading of Javascript.

Hopefully WordPress will push a fix out, that will allow Javascript to be loaded again but currently there has been no word from the Wordpress devs.


...are you aware of this at all, and is there any other fix we could use to get the page code working again, with the custom javascript?

Thank you smile

Offline

#2 2015-07-27 10:28:29

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

Re: Page Embed Problems

Here pasted code is correct, but viewing source on page, it seems like it was compressed or so. New line characters removed etc. Perhaps someone is compressing it.

Try in embed script remove "// Some comment" lines. then after compression even it should work. But it's definitely WP problem.

Offline

#3 2015-07-27 11:48:04

Robotics445
Member
Registered: 2014-02-25
Posts: 64

Re: Page Embed Problems

Hi, thanks for this, found it - it's a wordpress cdata bug due for fix in next major release:

https://core.trac.wordpress.org/tickets/major

(only red one on the page)

Hopefully helps anyone else with same issue. I will wait for release.

Thanks

Offline

Board footer