Okay
  Public Ticket #161168
Olark and Salient
Closed

Comments

  • Jonathan started the conversation
    We've tried putting the Olark chat code in raw JS and raw HTML elements with no luck. Any idea what we may be doing wrong or where we need to put this JS code in order to bring our chat operators back online? Thanks!
  • Jonathan replied

    I put the JavaScript back onto the page in a raw JS element for your inspection.

    www.watchmanmonitoring.com

  • Jonathan replied

    I put the JavaScript back onto the page in a raw JS element for your inspection.

    www.watchmanmonitoring.com

  •  1,086
    ThemeNectar replied

    Hey Jonathan!

    I'm just seeing a syntax error on this line:

    <script data-cfasync="false" type='text/javascript'>/*{literal}<![CDATA[*/

    It seems that's getting added inside of a script tag already so you should remove the <script> tags from it or add it somewhere else like the header.php or footer.php

    Cheers :)

  • Jonathan replied

    Unless we messed up something else, this code has been removed and Olark isn't working still. Any other suggestions?

  • Jonathan replied

    When we add the olark code to the footer directly, it still fails, and olark is saying the problem is that some of the other javascript loads after Olark,and causes the olark failure.

    where can we add the olark code to have it show up after the rest of the theme's scripts?

  • Watchman replied

    Even after we got the olark to load at the end, by adding it to the footer.php, our chat is still missing.

    what can be done? http://www.watchmanmonitoring.com/  needs its chat back...

    Thanks

    -Allen

     

    PS I tried enabling w3 Total cache, but it didn't change anything.

  • Watchman replied

    i just got this from olark

     

    Having tried to remove every script from your page and adding them back one-by-one, it appears that one of two possible scripts is preventing Olark from loading normally: 

    script type='text/javascript' src='/wp-content/themes/salient/js/appear.js?ver=1.0'  
    script type='text/javascript' src='/wp-content/themes/salient/js/init.js?ver=3.1'

    I would try removing this and let me know if that resolves your issue at all. 

     

     

     

  • Watchman replied

    Removing this from init.js fixed the problem for us.

    + /* Terrible non-specific selector, commented out for Olark compatability
    if($(this).parents('ins').length == 0){
    $(this).wrap('<div class="iframe-embed-standard"/>');
    }
    + */

    Please take this into consideration in the next release of salient.

  •  1,086
    ThemeNectar replied

    Hey guys, I apologize for the delay!  It's worth noting that every time you post a new comment before I respond your tickets gets unintentionally bumped to the bottom of my queue since on my end tickets are sorted from oldest to newest in terms of last comment posted. Unfortunately this is the nature of ticksy and this ticket was reset to the bottom 4 times (number of comments posted after Jonathan's initial response to me).

    ----

    Watchman Monitoring, i'm glad you narrowed down the piece that interferes with the plugin - the reason the selector is targeting all iframes is to add responsiveness to them, this rarely creates issues but I will definitely note to mend it for Olark :)

    Cheers

  • Watchman replied

    Thanks for the information about how ticksy works, hopefully we won't have to use it too often in the future ;-)

  •  1,086
    ThemeNectar replied

    You're very welcome, and again I apologize for the troubles! :)

  • [deleted] replied

    hello dears, sorry, but dont have this line in my init.js

    + /* Terrible non-specific selector, commented out for Olark compatability

    if($(this).parents('ins').length == 0){
    $(this).wrap('<div/>');
    }
    + */

    and orlak dont works :/

    anyone can help me?

  • Watchman replied

    Until themenectar comes up with a better fix, remove the following:

    From wp-content/themes/salient/js/init.js near line 1632

    That should solve your problem.

    See attached.. remove or comment out the text in the image.

  • Watchman replied

    I just applied the latest release of Salient and confirm that fixes olark out of the box. thank you.