New homepage contains incorrect link to prefences when hosted on a sub-path
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
The new homepage feature introduced in 18.5 contains a 'banner' which directs users to their preferences. However the link to the user preferences is incorrect when the Gitlab instance is hosted at a subpath, e.g. https://my.domein/gitlab/. In that case the link refers to https://my.domain/-/profile/preferences#behavior while it should refer to https://my.domain/gitlab/-/profile/preferences#behavior
Steps to reproduce
- Set-up a standard GitLab CE 18.4 on a subpath, so when using Omnibus set the external_url to 'https://my.domain/gitlab'
- Upgrade existing instance from 18.4 to 18.5
- Log in with any user which hasn't logged in before (so that the banner on the homepage is shown)
- Click on 'update your user preferences' in the banner entitled 'Welcome to the new homepage'
Example Project
N/A
What is the current bug behavior?
When clicking the link the browser attempts to open the incorrect path https://my.domain/-/profile/preferences#behavior
What is the expected correct behavior?
The link should refer to https://my.domain/gitlab/-/profile/preferences#behavior
Relevant logs and/or screenshots
N/A
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 3.2.8 Gem Version: 3.7.1 Bundler Version:2.7.1 Rake Version: 13.0.6 Redis Version: 7.2.10 Sidekiq Version:7.3.9 Go Version: unknown GitLab information Version: 18.5.1 Revision: 2e5ae10576d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 17.6 URL: https://my.domain/gitlab HTTP Clone URL: https://my.domain/gitlab/some-group/some-project.git SSH Clone URL: git@my.domain:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: openid_connect GitLab Shell Version: 14.45.3 Repository storages: - default: unix:/var/opt/gitlab/gitaly/gitaly.socket GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Gitaly - default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket - default Version: 18.5.1 - default Git Version: 2.50.1
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.45.3 ? ... OK (14.45.3) Running /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes Tables are truncated? ... skipped All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Cable config exists? ... yes Resque config exists? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 4/1 ... yes 4/2 ... yes 5/3 ... yes 7/4 ... yes 8/5 ... yes 15/6 ... yes 17/7 ... yes 19/8 ... yes 21/9 ... yes 23/10 ... yes 23/11 ... yes 23/12 ... yes 27/13 ... yes 29/14 ... yes 29/15 ... yes 29/16 ... yes 33/17 ... yes 17/18 ... yes 17/19 ... yes 29/20 ... yes Redis version >= 6.2.14? ... yes Ruby version >= 3.0.6 ? ... yes (3.2.8) Git user has default SSH configuration? ... yes Active users: ... 2 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
See #578217 (comment 2868794003)
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.