Wrong .js path in sitesearch1-results.html

Issues related to previewing and publishing your web site.
Post Reply
hernanz
 
 
Posts: 1
Joined: Tue Mar 24, 2020 6:23 pm

Wrong .js path in sitesearch1-results.html

Post by hernanz »

I'm using version 15.3.0.
In a web site with different folders (ie, https://doymus.com/es/formacion/formacion_Ing_Req.php), using a standard site search, it works properly in the root directory of the web site but it does not work in the sub-folders.
In sitesearch1-results.html, there are several include scripts:

two of them keep the subfolder structure:
<script src="../../style/searchindex.js"></script>
<script src="../../style/wb.sitesearch.min.js"></script>

but one of them does not:
<script src="style/jquery-1.12.4.min.js"></script>

Changing this last to:
<script src="../../style/jquery-1.12.4.min.js"></script>

the search works.
User avatar
Pablo
 
Posts: 21572
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Wrong .js path in sitesearch1-results.html

Post by Pablo »

Please see the help:
Use absolute links
Enable this option if you want to use the search engine in sub folders. In that case absolute links must be used otherwise the links in the search results will not be using the correct path (because there is only one search index in the root of the website).
Post Reply