Skip to content

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

Closed
@wyattoday

Description

@wyattoday

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions