Skip to content

500 Error on some Wiki pages #32275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Hannes1909 opened this issue Oct 16, 2024 · 2 comments
Closed

500 Error on some Wiki pages #32275

Hannes1909 opened this issue Oct 16, 2024 · 2 comments
Labels
issue/duplicate The issue has already been reported. type/bug

Comments

@Hannes1909
Copy link

Hannes1909 commented Oct 16, 2024

Description

I'm trying to organize my Projects wiki in folders. Some of the links work perfectly fine, some throw an 500 Error. For better understanding here the file/folder structure:

git clone https://git.URL.de/Organization/Repository.wiki.git
Klone nach 'Repository.wiki'...
remote: Enumerating objects: 266, done.
remote: Counting objects: 100% (266/266), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 266 (delta 134), reused 0 (delta 0), pack-reused 0 (from 0)
Empfange Objekte: 100% (266/266), 317.47 KiB | 6.22 MiB/s, fertig.
Löse Unterschiede auf: 100% (134/134), fertig.
tree Repository.wiki/
Repository.wiki/
├── TopLevel1
│   ├── Home.md
│   ├── images
│   │   └── image1.png
│   └── TopLevel2
│       └── L2Page.md
...

Both Markdown-Files entered the Repository with the same commit - Home.md works fine, L2Page.md throws a 500 Error: GetCommitByPath, object does not exist [id: L2Page.md, rel_path: ], though when cloning the Repository the file shows up, is editable, also can be pushed to the repository again. The 500 Error stays, even after editing and recommiting/pushing the file multiple times.

That file is just an example, i have several markdown files throwing the same error, not necesarily in a level 2 subfolder, some files from Level1 Subfolders also throw the error when accessing them via the gitea wiki.

My Links from the HomePage to the subfolders look like this (from global start page to Level1-Home, working):

* [[TopLevel1/Home.md]]

From Level1 Homepage to L2Page.md (throwing 500):

* [[TopLevel1/TopLevel2/L2Page.md]]

I run gitea from the latest docker image, even with Debug-Logging enabled there are no clues on whats going wrong:

2024/10/13 19:18:58 ...dules/git/command.go:291:Run() [D] git.Command.RunDir(/data/git/repositories/organisation/repository.wiki.git): /usr/bin/git -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= log -1 --pretty=format:%H -- L2Page.md
2024/10/13 19:18:58 ...ers/web/repo/wiki.go:587:Wiki() [E] GetCommitByPath: object does not exist [id: L2Page.md, rel_path: ]
2024/10/13 19:18:58 .../context_response.go:70:HTML() [D] Template: status/500
2024/10/13 19:18:58 ...eb/routing/logger.go:102:func1() [I] router: completed GET /organisation/repository/wiki/TopLevel1/TopLevel2/L2Page.md for 192.168.178.59:0, 500 Internal Server Error in 57.4ms @ repo/wiki.go:532(repo.Wiki)

While troubleshooting I did a

git ls-files | grep L2Page.md
fatal: detected dubious ownership in repository at '/data/git/repositories/organisation/repository.wiki.git' 

and set

git config --global --add safe.directory /data/git/repositories/organisation/repository.wiki.git

but that did not solve the issue.

Gitea Version

1.22.3 (latest docker)

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 22.04 - docker compose

How are you running Gitea?

Docker Compose file with no special configuration, I can provide it later. Traefik is used for SSL Offloading and LetsEncrypt, the gitea container is using port 22 for SSH (git clone, git push etc.)

Database

PostgreSQL

@wxiaoguang
Copy link
Contributor

Gitea doesn't support sub-dir in wiki

-> Hierarchy in Wiki #823

@wxiaoguang wxiaoguang added the issue/duplicate The issue has already been reported. label Oct 16, 2024
@Hannes1909
Copy link
Author

Oh sorry, missed that, Ill close for duplicate, i only thought it to be quite strange that some pages work fine, while others don't.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. type/bug
Projects
None yet
Development

No branches or pull requests

2 participants