Page MenuHomePhabricator

🎲️ Handle unexpected URL modification (url-not-modifiable) for PATCH sitelinks
Closed, ResolvedPublic

Description

  • should be included in the post patch validation
  • validate and deserialize the sitelinks first and then compare the URLs in the (known to be valid!) patched serialization against the URLs in the original read model serialization

Event Timeline

Hello @Ifrahkhanyaree_WMDE, two questions:
1- Do we want to add the site ID to the context (and the error message) for this error to point to which sitelink the user tried to modify its URL?
2- Do we want to return this error in the following case:

when replacing a sitelink that already exists, and providing a URL that is the same as the URL for the currently stored sitelink ( so do we ignore it since the URL is the same? or do we return the error anyway?).

In general, do we care about checking the stored URL for the sitelink? or do we just return this error as soon as we find the user added the URL in the request?

Change 1007587 had a related patch set uploaded (by Muhammad Jaziraly; author: Muhammad Jaziraly):

[mediawiki/extensions/Wikibase@master] REST: Check if sitelink's URL is modified

https://gerrit.wikimedia.org/r/1007587

Change 1007587 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Handle URL modification request in PatchSitelinks

https://gerrit.wikimedia.org/r/1007587