Wikis API cannot delete certain pages

Summary

Trying to delete pages I created using the API return a 404 on some slugs.

Steps to reproduce

Create a document using the API by posting to


{
"format": "markdown",
"title": "Messages/Assembly 2011 presentation... interesting",
"content": "Hello world"
}

returns

{
    "format": "markdown",
    "slug": "Messages/Assembly-2011-presentation...-interesting",
    "title": "Assembly 2011 presentation... interesting",
    "content": "hello world"
}

Now trying to delete this slug

/api/v4/projects/5/wikis/Messages%2FAssembly-2011-presentation...-interesting

returns a 404 error

tried with %2F as / returns a 404 as well.

Accessing this page on the regular display is still possible: /user/project/wikis/Messages%2FAssembly-2011-presentation...-interesting the HTML for the document.

Example Project

What is the current bug behavior?

Return a 404 and keep page in the wiki.

What is the expected correct behavior?

Return a 204 and delete the page.

Relevant logs and/or screenshots

Output of checks

System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown

GitLab information Version: 10.5.2-ee Revision: gitlab-ce@3834bbedf05c309d05a33fb5da09be6d06372799 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.5 URL: http://gitlab.fritz.box HTTP Clone URL: http://gitlab.fritz.box/some-group/some-project.git SSH Clone URL: git@gitlab.fritz.box:some-group/some-project.git Elasticsearch: no Geo: yes Geo node: Primary Using LDAP: no Using Omniauth: no

GitLab Shell Version: 6.0.3 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Checking GitLab Shell ...

GitLab Shell version >= 6.0.3 ? ... OK (6.0.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 1/5 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... 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? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/5 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.9.5 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 15 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Well not a fix but a workaround is deleting the item thru the rails console.

Edited Sep 02, 2020 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading