Bootstrap.min.js issue

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
User avatar
crispy68
 
 
Posts: 3091
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Bootstrap.min.js issue

Post by crispy68 »

@Pablo, not sure if this is a bug or something that I'm missing or a wrong setting.

I created a simple page that is mainly grids and text. There is a responsive menu and themeable button on a master page. Pretty basic.

When I preview Chrome is throwing this error:

Uncaught DOMException: Failed to execute 'querySelector' on 'Document': './index.html' is not a valid selector.
at o (file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js:6:858)
at file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js:6:51816
at Array.map (<anonymous>)
at Ye.refresh (file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js:6:51799)
at new Ye (file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js:6:51442)
at file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js:6:54215
at Array.forEach (<anonymous>)
at file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js:6:54203
at i (file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js:6:4846)


I can see in the html code that it is calling 'bootstrap.min.js' but I'm not sure what is actually using it. When I remove it from the html, the error goes away and I don't notice any changes or anything not working so I can't say for sure if it is needed or not but would assume it is if WB is generating it.

I also sometimes see this error:

DevTools failed to load source map: Could not load content for file:///C:/Users/Ron/Desktop/WB12-Preview/js/bootstrap.min.js.map: System error: net::ERR_FILE_NOT_FOUND

In what instances would bootstrap.min.js be added to the html? Is there anything I need to specifically look at? I can provide a copy of my project if needed. It happens on every page.
User avatar
Pablo
 
Posts: 23613
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Bootstrap.min.js issue

Post by Pablo »

The bootstrap script will be added when you use an object that uses bootstrap, for example: tooltips, menus, dialogs, popups etc.
It is difficult to say which exact object adds it without seeing your project.

The error about bootstrap.min.js.map is a configuration settings of your browser.
Developer Tools -> Settings -> Enable JavaScript source maps
WWB does not include source maps.
User avatar
crispy68
 
 
Posts: 3091
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Bootstrap.min.js issue

Post by crispy68 »

I have sent you a link to the demo file.
User avatar
Pablo
 
Posts: 23613
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Bootstrap.min.js issue

Post by Pablo »

Thanks for sharing the project.
Bootstrap is included because you have enabled 'scrollspy' on the main menu (mainMenu).
However, Bootstraps throws an error because the links in the menu are not bookmarks, but links to another page.
Scrollspy only works for bookmarks on the same page.
https://getbootstrap.com/docs/5.0/components/scrollspy/
User avatar
crispy68
 
 
Posts: 3091
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Bootstrap.min.js issue

Post by crispy68 »

Hey Pablo,

So on the pages I'm not using bookmarks (which ended up being the demo I provided) unchecking that does alleviate the error. So, the demo I provided was not a good one.

However, on a page where I am using bookmarks and non-bookmarks in the menu, the error persists. So based on this, does this mean if the links in the menu are not all bookmarks on the page it will throw this error?
User avatar
Pablo
 
Posts: 23613
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Bootstrap.min.js issue

Post by Pablo »

Scrollspy can only be used for bookmarks on the same page.
Also, if you add links to other pages then Bootstrap will throw an error.

Note that this not directly related to WWB. I have no control over this behavior.
User avatar
crispy68
 
 
Posts: 3091
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Bootstrap.min.js issue

Post by crispy68 »

Thanks Pablo. So technically the bookmark links still do work as they should. However, using this in conjunction with a master page will cause the errors it seems. I will have to implement it differently then.
Post Reply