Codeberg/Community
54
325
Fork
You've already forked Community
12

"internal server error" on edwinvanl/rtttex wiki #1570

Closed
opened 2024年05月21日 19:52:34 +02:00 by edwinvanl · 7 comments

Comment

I tried to setup a wiki here: https://codeberg.org/edwinvanl/rtttex/wiki/?action=_pages, but it broke the wiki. I have tried to repair it, by checking out and cleaning up the page, but that did not work. The wiki git repository currently contains one markdown file and one gif.

### Comment I tried to setup a wiki here: https://codeberg.org/edwinvanl/rtttex/wiki/?action=_pages, but it broke the wiki. I have tried to repair it, by checking out and cleaning up the page, but that did not work. The wiki git repository currently contains one markdown file and one gif.

Sounds very similar to #1566, could you please describe what you did (did you create the wiki and it broke right off the bat)?

Sounds very similar to https://codeberg.org/Codeberg/Community/issues/1566, could you please describe what you did (did you create the wiki and it broke right off the bat)?

I did notice that one, but their solution did not seem relevant to my issue at all, so decided to open a new issue instead.

The steps I took as far as I remember:

  1. Enable the wiki
  2. Add a new page. The new page had a header (## header) and one (temporary) dead link [vhs]()
  3. When saving this, I got the internal server error.
  4. I tried to fix it, by pulling the wiki repository and removing the dead link. Even after pushing that, it is still broken.
I did notice that one, but their solution did not seem relevant to my issue at all, so decided to open a new issue instead. The steps I took as far as I remember: 1. Enable the wiki 2. Add a new page. The new page had a header (## header) and one (temporary) dead link `[vhs]()` 3. When saving this, I got the internal server error. 4. I tried to fix it, by pulling the wiki repository and removing the dead link. Even after pushing that, it is still broken.

I can't reproduce this on neither 7.0.2, nor current 8.0. I'll keep trying.

I can't reproduce this on neither 7.0.2, nor current 8.0. I'll keep trying.

Reproduced! Kinda.

@fnetX was kind enough to do a little digging on the Codeberg side, and it appears that when trying to list the wiki pages, Forgejo is trying to find a file named Screenshots.md - which does not exist on the main branch of the wiki.

However, it does exist on the develop branch! That, in itself should not be a problem, because the Forgejo is supposed to look up wiki pages from the wiki's default branch (which should be main). In this particular case, it appears that the default branch was set to develop instead, and that confuses the heck out of Forgejo.

I had to fiddle with the database to reproduce it, but... I can reproduce it now, and that gives me a few ideas how to tackle this further.

The quick fix here, I believe, would be to delete the wiki completely ("Delete wiki data" on the repo settings page), and re-create it, making sure there's only one branch. I'm not 100% convinced that will work, it might result in the same situation we have now. I'm digging into this further, and will report back as I know more, and if I managed to figure out a safe way to fix the repo until a fix can be deployed.

Reproduced! Kinda. @fnetX was kind enough to do a little digging on the Codeberg side, and it appears that when trying to list the wiki pages, Forgejo is trying to find a file named `Screenshots.md` - which does not exist on the `main` branch of the wiki. However, it *does* exist on the `develop` branch! That, in itself should not be a problem, because the Forgejo is supposed to look up wiki pages from the wiki's default branch (which should be main). In this particular case, it appears that the default branch was set to `develop` instead, and that confuses the heck out of Forgejo. I had to fiddle with the database to reproduce it, but... I can reproduce it now, and that gives me a few ideas how to tackle this further. The quick fix here, I believe, would be to delete the wiki completely ("Delete wiki data" on the repo settings page), and re-create it, making sure there's only one branch. I'm not 100% convinced that will work, it might result in the same situation we have now. I'm digging into this further, and will report back as I know more, and if I managed to figure out a safe way to fix the repo until a fix can be deployed.

I think I now understand how this problem came to be. The repository was migrated from GitLab, right?

Meanwhile, I think the easiest way to resolve the situation until a fix can be deployed on the Codeberg/Forgejo side is to delete the wiki completely and recreate it. This should Just Work. You may even see a "Normalize the Wiki branch name" button near the bottom of the repo settings page. That is safe - and a good idea! - to press in this case.

I think I now understand how this problem came to be. The repository was migrated from GitLab, right? Meanwhile, I think the easiest way to resolve the situation until a fix can be deployed on the Codeberg/Forgejo side is to delete the wiki completely and recreate it. This should Just Work. You may even see a "Normalize the Wiki branch name" button near the bottom of the repo settings page. That is safe - and a good idea! - to press in this case.

Yes it is migrated from gitlab, although I only started the wiki after migrating to codeberg

Yes it is migrated from gitlab, although I only started the wiki after migrating to codeberg

Thanks, I deleted the data and recreated the wiki without further problems

Thanks, I deleted the data and recreated the wiki without further problems
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#1570
Reference in a new issue
Codeberg/Community
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?