Updating article title via API's PATCH does not update slug/URL | World Anvil

Remove these ads. Join the Worldbuilders Guild

Updating article title via API's PATCH does not update slug/URL

open
· Api ·
By Hanhula on 10/22/2023
· Assigned to GorkamWorka
· Bug

I'm honestly not certain if this is intended or not, but I don't thiink it would be intended? Currently, updating an article's title via the PATCH API only updates the title field - it doesn't change the slug or the link, either on the site or through the API. The title changes, but nothing else does. Since the title-to-url logic is different on WA with more special characters (accented etc), it's my hope that this is a bug.   Pics of call/response: Pic 1: Un-updated https://cdn.discordapp.com/attachments/1020269206899540000/1165779410029383820/chrome_sktA2yPksE.png?ex=654817ae&is=6535a2ae&hm=594e644c060a7bf8036f78b5352e345494d88efd2a054e72ba86667f5903bf43&   Pic 2: PATCH call https://media.discordapp.net/attachments/1020269206899540000/1165779409710620733/chrome_5iecvdtgEO.png?ex=654817ae&is=6535a2ae&hm=6bffa40940e964e3605e84a14430aae296c4bd8db31ed04000d9e07913100e8a&=&width=1752&height=910   Pic 3: GET call, granularity 2 https://media.discordapp.net/attachments/1020269206899540000/1165779409408638986/chrome_H3Xug1oaz4.png?ex=654817ae&is=6535a2ae&hm=3ecc36a3ec0958b13e543354576b2457434b2f287c8b2a56289d322258a92a80&=&width=1752&height=910

Steps to Reproduce

1. Create an article with any given title. 2. Update the article via the API's patch. In the call, only pass through the title field as one to update (e.g. { "title": "Testy McTesttitties" } as the request payload) 3. Check response. 4. Optionally, GET request the article and view URL/slug there as well.

Operating System

Windows

Browser

Google Chrome

History

Dimitris @ 23 Oct, 2023 01:46:07 Developer
Assigned GorkamWorka
Dimitris @ 23 Oct, 2023 01:46:51 Developer

This should be automatically updated for anyone that does not have access to custom slugs and only updated if manually changed for those that can.

SoulLink @ 29 Oct, 2023 12:03:15 Moderator
SoulLink Added tag Bug