You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
project.wikis.create with subpages results in 404 Wiki Page Not Found #1079
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'
Activity
make it possible to update subpages in wikis
justinTM commentedon Sep 8, 2021
@kernelport I think I can replicate your url encoding fix as well.
this works:
but this will 404 error:
fix: allow updating of sub-pages in wikis
fix: allow updating of sub-pages in wikis
fix: use url-encoded ID in all paths
fix: use url-encoded ID in all paths
fix: use url-encoded ID in all paths ALTERNATE METHOD
fix: use url-encoded ID in all paths ALTERNATE METHOD
fix: use url-encoded ID in all paths ALTERNATE METHOD
fix: use url-encoded ID in all paths ALTERNATE METHOD
fix: use url-encoded ID in all paths
fix: use url-encoded ID in all paths
fix: use url-encoded ID in all paths
fix: use url-encoded ID in all paths
fix: use url-encoded ID in all paths
fix: use url-encoded ID in all paths