Something odd happening with script

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
thisazlife
 
 
Posts: 71
Joined: Mon Apr 24, 2017 4:19 am
Location: Chandler, AZ USA
Contact:

Something odd happening with script

Post by thisazlife »

removed

On the index.html page I have added Facebook chat plugin. If I put the plug in on a different website it works perfectly but not on this website, it appears to terminate. Additionally I see schema.org info that I can't find anywhere on this site. I'd appreciate any assistance you will provide.
Thanks!
Last edited by thisazlife on Tue Sep 20, 2022 12:00 am, edited 1 time in total.
Steve Colbeth
Arizona Real Estate Agent / Consultant
http://stevecolbeth.com
me@stevecolbeth.com
Chandler, Arizona - USA
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Something odd happening with script

Post by Pablo »

Your page is using layout grids so if you add the script at the end of the body then it will may not be visible because it's not part of the layout structure of the page.
You will need to insert the code inside an HTML object and place it in a layout grid.

Note that I cannot assist you with custom or third party code, because every script is different and for me it may also take a lot of time to figure out how to use the code correctly.
If you want to insert custom code then it is assumed that you know what you are doing.
However, the code will be inserted "AS IS", so if it does not work then either the code is not correct or it conflicts with other code on the page.
thisazlife
 
 
Posts: 71
Joined: Mon Apr 24, 2017 4:19 am
Location: Chandler, AZ USA
Contact:

Re: Something odd happening with script

Post by thisazlife »

Thanks, I tried to put the code in the html object and placing it in my first grid then re-publishing but it still didn't work. I understand you can't troubleshoot 3rd party scripts so I appreciate your time you already spent.

Did you notice the schema.org info in the index.html page? I can't find any object on that page that contains schema.org info and there isn't a custom json file in the documents\wysiwyg...\system folder either... I can't figure out where that data is coming from as I'd like to change it. I tried adding the schema.org object but then there are 2 references to schema.org in the published code. Any ideas?
Steve Colbeth
Arizona Real Estate Agent / Consultant
http://stevecolbeth.com
me@stevecolbeth.com
Chandler, Arizona - USA
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Something odd happening with script

Post by Pablo »

If the code is correct then it should work when published.
Did you notice the schema.org info in the index.html page?
The object ID is: StructuredData1
You can find it via the Object Manager
thisazlife
 
 
Posts: 71
Joined: Mon Apr 24, 2017 4:19 am
Location: Chandler, AZ USA
Contact:

Re: Something odd happening with script

Post by thisazlife »

Nope, there's no StructuredData1 object.
Steve Colbeth
Arizona Real Estate Agent / Consultant
http://stevecolbeth.com
me@stevecolbeth.com
Chandler, Arizona - USA
thisazlife
 
 
Posts: 71
Joined: Mon Apr 24, 2017 4:19 am
Location: Chandler, AZ USA
Contact:

Re: Something odd happening with script

Post by thisazlife »

Using WB16 I create a new page, enter the Facebook chat plugin between body tags, publish, plug in installs and works great!
Using WB17 I create a new page, enter the Facebook chat plugin between body tags, publish, plug in fails.

<!-- Messenger Chat Plugin Code -->
<div id="fb-root"></div>

<!-- Your Chat Plugin code -->
<div id="fb-customer-chat" class="fb-customerchat">
</div>

<script>
var chatbox = document.getElementById('fb-customer-chat');
chatbox.setAttribute("page_id", "337859316595549");
chatbox.setAttribute("attribution", "biz_inbox");
</script>

<!-- Your SDK code -->
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v15.0'
});
};

(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk/ ... merchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
Steve Colbeth
Arizona Real Estate Agent / Consultant
http://stevecolbeth.com
me@stevecolbeth.com
Chandler, Arizona - USA
User avatar
Pablo
 
Posts: 22489
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Something odd happening with script

Post by Pablo »

In the project you have shared there is an object named StructuredData1.
You can find it via the Object Manager.

The script will be inserted "AS IS". There is no difference between WB16 and WB17. Unless you have used different settings.
thisazlife
 
 
Posts: 71
Joined: Mon Apr 24, 2017 4:19 am
Location: Chandler, AZ USA
Contact:

Re: Something odd happening with script

Post by thisazlife »

UPDATE: Thank you for your assistance. I have everything fixed now!

Interestingly the objects named StructuredData1 did not show in the object manager on any of the pages. However if I did a search on "StructuredData1" it did find that object on several pages which I was then able to delete, all were marked "visible" yet they did not show up without searching for them.

On my script issue, In V17 a JavaScript option was checked in my options, "Generate external JS file for page specific scripts". I don't have record that I ever checked that box but was able to track it down as the difference between V16 and V17 options. Once I removed that check, everything published as I was expecting it to.
Steve Colbeth
Arizona Real Estate Agent / Consultant
http://stevecolbeth.com
me@stevecolbeth.com
Chandler, Arizona - USA
Post Reply