With "external issue tracker" setting enabled, clicking the "Pull Requests", "New file", "Upload file", "Edit file" links returns 404 #1847

Closed
opened 2017-05-31 20:34:10 +00:00 by wyattoday · 0 comments
wyattoday commented 2017-05-31 20:34:10 +00:00 (Migrated from github.com)

In any repository, click Settings, and then choose "Use external issue tracker", and set the external URL. Click "Update Settings". Now, when you visit the "Pull Requests" link you'll get an error 404.

I looked in our log and got this error:

2017/05/31 15:57:39 [...ules/context/repo.go:525 func1()] [E] CheckUnit: You are not allowed to visit this repository unit: 2

Creating a row in our database in the "repo_unit" table with type "2" and index "2" with a "{}" config fixed it for us. So, something in the "Update Settings" code is not correctly saving the Pull Request permissions for the repository.

The side-effect to making that change directly in the database, though, is that now there are 2 "Issues" tabs.

Update (6/2/2017):

There is also a 404 error when clicking "New file" and "Upload file" using the above repository settings. The workaround fixes the 404 there as well.

So, to recap, with the settings set like above (external issue tracker), the following things fail with a 404 error:

  • Clicking "Pull request" tab link
  • Clicking the "New file" blue link
  • Clicking the "Upload file" blue link
  • Clicking the "Edit file" "pencil" link on any file.
- Gitea version (or commit ref): https://github.com/go-gitea/gitea/commit/5554165a0c5da0a62165d9c429839f4a56b01af7 - Git version: 2.13.0 - Operating system: Ubuntu 16.04 - Database (use `[x]`): - [ ] PostgreSQL - [X] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [X] Yes: https://try.gitea.io/wyattoday/simple-respository/pulls, https://try.gitea.io/wyattoday/simple-respository/settings - [ ] No - [ ] Not relevant - Log gist: In any repository, click Settings, and then choose "Use external issue tracker", and set the external URL. Click "Update Settings". Now, when you visit the "Pull Requests" link you'll get an error 404. I looked in our log and got this error: ``` 2017/05/31 15:57:39 [...ules/context/repo.go:525 func1()] [E] CheckUnit: You are not allowed to visit this repository unit: 2 ``` Creating a row in our database in the "repo_unit" table with type "2" and index "2" with a "{}" config fixed it for us. So, something in the "Update Settings" code is not correctly saving the Pull Request permissions for the repository. The side-effect to making that change directly in the database, though, is that now there are 2 "Issues" tabs. **Update (6/2/2017):** There is also a 404 error when clicking "New file" and "Upload file" using the above repository settings. The workaround fixes the 404 there as well. So, to recap, with the settings set like above (external issue tracker), the following things fail with a 404 error: - Clicking "Pull request" tab link - Clicking the "New file" blue link - Clicking the "Upload file" blue link - Clicking the "Edit file" "pencil" link on any file.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
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: lunny/gitea#1847
No description provided.