Internal pages blank#164
Labels
No labels
breaking
bug
build_pr_image
documentation
d̶u̶p̶l̶i̶c̶a̶t̶e̶
feature
good first issue
improvement
i̶n̶v̶a̶l̶i̶d̶
open questions
performance
refactor
research required
No milestone
No project
No assignees
6 participants Notifications
Due date No due date set.
Dependencies
No dependencies set.
Reference
Codeberg/pages-server#164
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have my own pages-server running and it does a great job serving up the
/index.htmlpage content. However if I try going to an internal page (like/about.htmlor/about/index.html), it's returning empty<head>and<body>tags so the page is completely blank. It does appear to be routing correctly though, because if I go to a page that doesn't exist I get the "Page not found" error instead of the blank page. Is this a common misconfiguration you've seen before? Thank you!I can confirm this problem. However, I also run into it on pages with index.html.
I get no errors in the console, even with DEBUG set to true.
Edit: removing the `key-database.pogreb seems to solve the problem temporarily.
Is the data modified, or maybe corrupted? (Like, just missing the rest of the page)? I think I've seen something like this before.
If I
systemctl restart pages-serverthe first hard refresh on any of these internal pages will work. However, any subsequent refresh results in the blank page (besides the homepage which works consistently).Sounds like the cache is not actually returning the data that it thinks it has.
Is there a way to disable the cache?
Potentially related issue: #142
Are there debugging steps we could take to pinpoint what is causing this? Thanks!
Ah yes, thank you for the link. Right, we had issues of incomplete content when directly accessing the Gitea server without a reverse proxy.
We decided against digging deeper and just reverting the configuration change :'(
Is the configuration change something in your environment, or in the project that has been updated? I'm running the latest release (v4.5) but still seem to be encountering the issue. I'm not clear if pages-server is doing the reverse proxying or if you're using a separate service for that. Thank you!
If you specify your server address, you could either use a public facing URL (e.g. https://codeberg.org/) or an internal one (e.g. http://gitea-production.lxc.local:3000/). We use the former. When we tried the latter for a more direct connection, we had this issue.
I'm setting
GITEA_ROOTto a fully qualified domain name (public facing URL). Is there another place I should specifying this?I think the next debugging step would be to use a traffic analyzer like wireshark to see what is actually going on and where a request might stop working ...
I've pinpointed this problem to ~ line 165 in
server/upstream/upstream.go:Commenting this block out completely allows internal pages in format of
mysite.com/about/index.htmlto load correctly (mysite.com/about.htmlstill won't work).were you getting a blank page for
/about/index.htmlbefore? you were supposed to get a redirect to/about/which would serve up the content of index.html.that line of code isn't even responsible for that redirect, it's just supposed to redirect you from
/aboutto/about/Yeah it's really weird, not the fix I was expecting. It's actually just the
returnthat's causing the issue (not the whole block). My site hydrates to an SPA and the clientside router uses URLs without the trailing slash. So when that conditional is evaluating to true and returning at this point it must be preventing a critical block further down from running?Yes going to
/about/index.htmlor/about/would be blank (unless going there right after asystemctl restart pages-serverand the first page loaded like this would continue to work 🤷). My homepage/index.htmlalways worked.Wow, that's really confusing.
An alle pages-server admins & devs, i have created an dedicated room: https://matrix.to/#/!VTsiUcuAxMmLxesQRa:obermui.de?via=obermui.de
@dorianim, @jimafisk, ...