500 Error on some Wiki pages #13605

Closed
opened 2025-11-02 10:47:58 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Hannes1909 on GitHub (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

Originally created by @Hannes1909 on GitHub (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
GiteaMirror added the type/bugissue/duplicate labels 2025-11-02 10:47:58 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Oct 16, 2024):

Gitea doesn't support sub-dir in wiki

-> Hierarchy in Wiki #823

@wxiaoguang commented on GitHub (Oct 16, 2024): Gitea doesn't support sub-dir in wiki -> Hierarchy in Wiki #823
Author
Owner

@Hannes1909 commented on GitHub (Oct 16, 2024):

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.

@Hannes1909 commented on GitHub (Oct 16, 2024): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13605