You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out a small discrepancy in various taxonomy URLs, some of which produce an additional forward slash (resulting in a double forward slash) in links on the default page as well as in menu links.
The first problem is in the layouts/index.html file:
This is quite interesting, as exactly the same code is present in layouts/_default/list.html where it does not contain the beginning forward slash in the /tags/ string (as expected).
A similar problem occurs in layouts/_default/terms.html file:
Here, the whole URL was injected two times with the same server path (taken from config files baseURL variable?). I mean, let's assume that: baseURL="https://www.domain.tld/blog/". After the compilation, it resulted in menu nav links to look like: https://www.domain.tld/blog/blog/tags/ or https://www.domain.tld/blog/blog/categories/, and that is undesirable.
Note: I do not use the Multilingual Mode. Hopefully, this will not break it.
Many thanks and regards!
The text was updated successfully, but these errors were encountered:
zeroflags
changed the title
Double Forward Slash in URLs on Default Page
Double Forward Slash in Some URLs
Jan 10, 2018
I found out that the problem is more complex and the above proposed solution does not sanitize all of the possible issues. I am better closing this before causing more harm than good.
I found out a small discrepancy in various
taxonomy
URLs, some of which produce an additional forward slash (resulting in a double forward slash) in links on the default page as well as in menu links.The first problem is in the
layouts/index.html
file:This is quite interesting, as exactly the same code is present in
layouts/_default/list.html
where it does not contain the beginning forward slash in the/tags/
string (as expected).A similar problem occurs in
layouts/_default/terms.html
file:The last problem I found was in
partials/nav.html
file:Here, the whole URL was injected two times with the same server
path
(taken from config filesbaseURL
variable?). I mean, let's assume that:baseURL="https://www.domain.tld/blog/"
. After the compilation, it resulted in menu nav links to look like:https://www.domain.tld/blog/blog/tags/
orhttps://www.domain.tld/blog/blog/categories/
, and that is undesirable.Note: I do not use the Multilingual Mode. Hopefully, this will not break it.
Many thanks and regards!
The text was updated successfully, but these errors were encountered: