Lektor server doubles subfolder in url without obvious reason
See original GitHub issueI have a strange problem regarding the lektor server:
While my navigation works perfectly with every page and subpage, links to subpages in the content section don’t.
E.g. if I set a relative path like
[My Link to Subpage](/peter/personalinfo)
it is correctly solved in the browser view. If I hover the mouse over the link the browser shows the correct url 127.0.0.1:5000/peter/personalinfo.
But if I click it I get
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
and the url in the address field shows
127.0.0.1:5000/peter/peter/personalinfo
I.e. I click the correct url but the browser calls the wrong url and of course can’t find anything there. I don’t understand how this doubling can happen. I naively would expect that if I clicked a link the browser would exactly look at that address. But it seems like the server is redirecting to the malformed url. And yes, it does so with any link to a subpage.
the navigation looks like this:
Home
News
Peter
-- Personalinfo
-- Contact
-- Portfolio
Bob
-- Personalinfo
-- Contact
-- Portfolio
That only occurs with the lektor server. If I lektor build
and/or deploy it the whole project works fine.
Any idea why this happens and how to change it?
It happens under Ubuntu 20.04, MacOS Monterey and with both lektor 3.2 and 3.31.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top GitHub Comments
Perfect timing to get here! @dairiki your PR was merged 8 days ago, congrats. Now we need to wait until the changes are reflected in lektor werkzeug dependency. 😃
I have now made an attempt at an upstream fix: pallets/werkzeug#2338.