Invalid address for Bootstrap themes on Wappler 1.9.3 "/bootstrap/.. instead of "bootstrap/


#1

Wappler Version : 1.9.3.
Operating System : MacOs Mojave

Expected behavior

<link rel="stylesheet" href="bootstrap/4/lux/bootstrap.min.css">

Actual behavior

Wappler writes: <link rel="stylesheet" href="/bootstrap/4/lux/bootstrap.min.css">

Hi,

I got a problem today because I apply to a website the Bootstrap Lux theme and the webpage appears have not Bootstrap installed.

It seems that Wappler add the library as

<link rel="stylesheet" href="/bootstrap/4/lux/bootstrap.min.css">

while before address was:

<link rel="stylesheet" href="bootstrap/4/lux/bootstrap.min.css">

I tried in Chrome to edit the line deleting the initial “/” and formatting working well.
Unfortunately each time I’m saving the page, I get again the problem

HOW TO REPRODUCE:
Simply add a local bootstrap theme (like LUX, Materia or other)

thanks
Roberto


#2

Hello @updates
I just tested and it works as expected, adding the right include path.

Can you check what is your Links relative to option set to for this project:


#3

thank you … it was on site root.

Thank you very much again @Teodor


#4

Just switch it to document relative then :slight_smile:


#5

Hi @Teodor, is there a doc for what “Links Related To” actually does? And does it affect other href links on the page too or just included links/scripts?

Because I had the exact same issue and before recent updates, the project was working fine with this option set to “Site”. Now I HAVE to set it to “Document” to make it work.


#6

The option was not working correctly in previous versions from Wappler. It always generated links relative to document even when set to site.


#7

So, if I change the option to SITE now, will all the links automatically get updated?

Also, can you please explain in brief how exactly SITE & DOCUMENT options work?


#8

@nshkrsh - nothing much to be explained here.

  • Site relative links are relative to site root
    /css/style.css

  • Document relative links are relative to the document.
    ../../css/style.css

Your page is located at:
site.com/subfolder1/subfolder2/page.html


#9

I don’t know why, but I always find it confusing.
Understood the above explanation. :slight_smile:

On more question though: Is there a performance trade-off between the two methods in Wappler, or it doesn’t matter at all?


#10

No, choosing either of the settings won’t have any effect on the performance.