Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1104883
    Alejandro Jose S
    Participant

    Hello,

    I’m facing a problem due to javascript added to the topbar (or at least that’s what i think).
    Basically, the customizer sort of freezes if i add this code to the topbar in the customizer:

    <a href="javascript:void(Tawk_API.toggle())">
                            [x_icon type="comments"] Live Chat
            </a>

    When i add that code, the topbar sort of blocks itself, not allowing me to modify anything in that field and the “save” button (customizer) won’t work after that (it won’t save anything unless i refresh the page).

    As i said before, i suspect it’s because of the jS in it because if i add something else, it works normally. is that normal?
    the inspector also shows this error when i add that code, the topbar text field freezes and i try to hit the “save button” :
    http://prntscr.com/by3w0c
    http://prntscr.com/by3wli

    I have X 5.6.1 and cornerstone 1.3.0, i already tested for a plugin conflict but found neither of them is causing this issue. the problem’s there even with the tawk.to plugin disabled (where the API JS call comes from).

    #1105075
    Thai
    Moderator

    Hi There,

    Please provide us with your website URL so we can take a closer look.

    Thank you.

    #1106724
    Alejandro Jose S
    Participant
    This reply has been marked as private.
    #1106751
    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! I have checked your site and it seems that you have inserted an invalid html. Adding your code in the invalid html will make it worst. Could please post the html code you have inserted in your topbar content so that we can correct it?

    http://prntscr.com/byiyqw

    Thank you.

    #1106772
    Alejandro Jose S
    Participant

    you’ll see there’s a “live chat” text in the topbar. but it doesn’t work because i’m linking to the “popup” which is not a valid way to do that. they have an api and all i’d have to do is call the widget (code above) and it will open.

    #1106836
    Christian
    Moderator

    Glad you’ve sorted it out. 🙂

    #1108615
    Alejandro Jose S
    Participant

    I didn’t really sort it out, i used a workaround in the meantime, however the screenshot you sent me there is actually different from the code i have. it has a p tag before the div which is weird since i don’t have it on the code (maybe it’s something generated from your theme? ).

    here’s the entire code copy-pasted from the site:

    <div class="topbar-div"style="clear: both;">
     <span class="align-left">
    	<a href="https://twitter.com/MakingResults" target="_blank">
    			[x_icon type="twitter" style="font-size:15px; margin-right:6px;"]
    	</a>
    	<a href="https://www.linkedin.com/company/making-performance-matter-llc?trk=biz-companies-cym" target="_blank">
    			[x_icon type="linkedin" style="font-size:15px; margin-right:6px;"]
    	</a>
    	<a href="http://askmpm.com/feed/" target="_blank">
    			[x_icon type="rss" style="font-size:15px; margin-right:15px;"]
    	</a>
    	<a href="/about-mpm/">About MPM</a> | 
    	<a href="/perfsup01/login.php">Client Portal</a>
    </span>
    
    <span class="align-right">
    	<a href="#" style="margin-left:10px; display:inline-block !important;"> [cp_modal id="cp_id_e50b8"][x_icon type="comments" style="font-size:15px; margin-right:3px; "] Live Chat[/cp_modal]</a>
    	<a href="/contact" style="margin-left:10px;">
    			[x_icon type="envelope" style="font-size:15px; margin-right:3px;"] contact
    	</a>
    
     </span>
    </div>
    #1108693
    Lely
    Moderator

    Hi There,

    It seems working when I tried to add on my test site. See attached screenshot.
    Would you mind providing us with login credentials so we can take a closer look and try the code? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1117056
    Alejandro Jose S
    Participant

    That’s the “workaround” i was talking about, instead of adding the JS directly in the topbar (which couldn’t be done for some reason i still don’t know) i added it on a convertplug modal Pop-Up. Turned out my client loved that workaround and decided to keep it instead of the JS method.

    Just for peace of mind, would you mind testing this code, instead, on your site. Just to check this is an isolated problem and not a theme problem at all:

    <div class="topbar-div"style="clear: both;">
     <span class="align-left">
    	<a href="https://twitter.com/MakingResults" target="_blank">
    			[x_icon type="twitter" style="font-size:15px; margin-right:6px;"]
    	</a>
    	<a href="https://www.linkedin.com/company/making-performance-matter-llc?trk=biz-companies-cym" target="_blank">
    			[x_icon type="linkedin" style="font-size:15px; margin-right:6px;"]
    	</a>
    	<a href="http://askmpm.com/feed/" target="_blank">
    			[x_icon type="rss" style="font-size:15px; margin-right:15px;"]
    	</a>
    	<a href="/about-mpm/">About MPM</a> | 
    	<a href="/perfsup01/login.php">Client Portal</a>
    </span>
    
    <span class="align-right">
    	<a href="javascript:void(Tawk_API.toggle())">
                            [x_icon type="comments"] Live Chat
            </a>
    	<a href="/contact" style="margin-left:10px;">
    			[x_icon type="envelope" style="font-size:15px; margin-right:3px;"] contact
    	</a>
    
     </span>
    </div>

    this time instead of:

    <a href="#" style="margin-left:10px; display:inline-block !important;">
                     [cp_modal id="cp_id_e50b8"][x_icon type="comments" style="font-size:15px; margin-right:3px; "] Live Chat[/cp_modal]
    </a>

    i changed it with the original one:

    
    <a href="javascript:void(Tawk_API.toggle())">
                            [x_icon type="comments"] Live Chat
            </a>

    This code has http://Tawk.to API implemented. I tested it on the twentyfifteen theme and it worked, but as soon as i paste it on the topbar text-field, the entire customizer breaks.

    I tried removing that line of code and it works fine. so i’m pretty sure that small line of code is the culprit and since the only different part of it is a JS implementation, then JS is the problem here 🙁

    #1117348
    Christian
    Moderator

    Hey Alejandro,

    JS errors disrupts or might disrupt the normal function of the Customizer. It looks like the issue is with your third party plugin or script. Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

    Not sure where you’ve added the code in TwentyFifteen theme as there is no Customizer text field or option you can insert the code.

    You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/

    Thank you for understanding.

  • <script> jQuery(function($){ $("#no-reply-1104883 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>