Wikis cannot be edited when GitLab is installed under relative URL
Summary
Promoted from https://gitlab.com/gitlab-com/dev-sub-department/section-dev-request-for-help/-/issues/114.
A self managed 16.0.5 customer is seeing the following message when trying to edit wikis.
An error occurred while trying to render the content editor. Please try again.
Creating new wikis is possible, the error appears only when editing existing ones, including newly created wikis.
This happens for all users/projects/groups/browsers.
It looks like the cause is an incorrect URL is used when the POST is sent.
The instance is installed under the <instance name>/gitlab
relative URL.
When editing a wiki, the POST uses the below URL. Note the additional '/gitlab', which seems to be the cause for the HTTP 404 code.
<instance name>/gitlab/gitlab/dcoombe/personal-task-queue/-/wikis/Home/preview_markdown?render_quick_actions=false
When creating a wiki, the post uses the correct URL.
<instance name>/gitlab/dcoombe/personal-task-queue/-/wikis
The MR that potentially introduced this bug is !117797 (merged).
Steps to reproduce
- Install GitLab under a relative url (https://docs.gitlab.com/ee/install/relative_url.html)
- Try to edit a wiki