← Winnitude! Search  ·  Reader Mode (1228 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 8 LINKS

project.wikis.create with subpages results in 404 Wiki Page Not Found · Issue #1079 · python-gitlab/python-gitlab

Repository navigation

project.wikis.create with subpages results in 404 Wiki Page Not Found  #1079


New issue

New issue

Closed
#1819
Closed
project.wikis.create with subpages results in 404 Wiki Page Not Found #1079 #1819

Description

@kernelport's profile kernelport opened on Apr 22, 2020

Description of the problem, including code/CLI snippet

page = project.wikis.create({'title': "title/subtitle", 'content': "test content"})
does create a wiki subtitle in the directory title well.
If I try to edit this page with:
page.content = "update content"
page.title = "subtitle" # Attention: during update the page we have to set the title without the directory name
page.save()
I get gitlab.exceptions.GitlabUpdateError: 404: 404 Wiki Page Not Found

I can reproduce this by using curl:

curl --request PUT --data "content=update content" --header "PRIVATE-TOKEN: XXX" https://gitlab.kernelport.com/api/v4/projects/231/wikis/title/subtitle

But when I encode the slug URL it does work with curl.

curl --request PUT --data "content=update content" --header "PRIVATE-TOKEN: XXX" https://gitlab.kernelport.com/api/v4/projects/231/wikis/title%2Fsubtitle

How can I handle this URL Encoding for slug in python-gitlab correct?

Expected Behavior

Actual Behavior

Specifications

  • python-gitlab version: 2.0.1
  • API version you are using (v3/v4): V4
  • Gitlab server version (or gitlab.com): '12.8.1', 'd18b43a5f5a'
Reacted by JM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions