"Mark as resolved" button of a discussion do not follow config.relative_url_root
Summary
This issue can be seen when gitlab is not deployed at the root of the webserver (i.e. config.relative_url_root
set).
When a discussion is started on a merge request, it cannot be closed since the “Mark as resolved” button (class='line-resolve-btn'
). When activated, a request is sent is sent to http[s]://<host>/<namespace>/<project>/notes/<note_id>/resolve
instead of http[s]://<host>[relative_url_root]/<namespace>/<project>/notes/<note_id>/resolve
.
Steps to reproduce
- Have a gitlab installed with a
config.relative_url_root
set to/gitlab
- Open a merge request
- Start a discussion
- Try to mark the discussion as resolved.
Expected behavior
The discussion should be closed.
Actual behavior
The button gets replaced by a spinner, then nothing. Having a look at the network activity shows that the resorve request is sent to the host but to not include the relative_root_url
part of the url.
Relevant logs and/or screenshots
Output of checks
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 3.6.0 ? ... OK (3.6.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
8/16 ... ok
8/19 ... ok
8/20 ... ok
8/21 ... ok
8/22 ... ok
8/23 ... ok
8/26 ... ok
14/28 ... ok
14/29 ... ok
14/30 ... ok
14/31 ... ok
14/32 ... ok
14/33 ... ok
15/34 ... ok
8/35 ... ok
16/36 ... ok
16/37 ... ok
16/38 ... ok
15/39 ... ok
15/40 ... ok
14/41 ... ok
20/42 ... ok
21/43 ... ok
8/44 ... ok
8/45 ... ok
22/46 ... ok
22/47 ... ok
8/48 ... ok
22/49 ... ok
8/50 ... ok
22/51 ... ok
23/52 ... ok
8/53 ... ok
9/54 ... ok
22/55 ... ok
25/56 ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /home/git/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
8/16 ... yes
8/19 ... yes
8/20 ... yes
8/21 ... yes
8/22 ... yes
8/23 ... yes
8/26 ... yes
14/28 ... yes
14/29 ... yes
14/30 ... yes
14/31 ... yes
14/32 ... yes
14/33 ... yes
15/34 ... yes
8/35 ... yes
16/36 ... yes
16/37 ... yes
16/38 ... yes
15/39 ... yes
15/40 ... yes
14/41 ... yes
20/42 ... yes
21/43 ... yes
8/44 ... yes
8/45 ... yes
22/46 ... yes
22/47 ... yes
8/48 ... yes
22/49 ... yes
8/50 ... yes
22/51 ... yes
23/52 ... yes
8/53 ... yes
9/54 ... yes
22/55 ... yes
25/56 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/opt/git/bin/git"
Git version >= 2.7.3 ? ... yes (2.10.0)
Active users: 11
Checking GitLab ... Finished
Results of GitLab environment info
System information
System: Debian 8.6
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.5.1
Bundler Version:1.13.1
Rake Version: 10.5.0
Sidekiq Version:4.1.4
GitLab information
Version: 8.12.0
Revision: 0864ff9
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://host/gitlab
HTTP Clone URL: http://host/gitlab/some-group/some-project.git
SSH Clone URL: git@host:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 3.6.0
Repository storage paths:
- default: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /opt/git/bin/git