Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behavior when the slug already exists #49

Closed
cweiske opened this issue Sep 14, 2016 · 3 comments
Closed

Behavior when the slug already exists #49

cweiske opened this issue Sep 14, 2016 · 3 comments

Comments

@cweiske
Copy link
Contributor

cweiske commented Sep 14, 2016

If the "slug" the client sends is already taken - should the server silently ignore it and create its own slug, or throw an error?

@voxpelli
Copy link

voxpelli commented Sep 14, 2016

I think that a server should be allowed to be liberal in what it accept and thus try to handle such a conflict if it believes that it can do so (in line with the Robustness principle and such) and if it can't then should return an invalid_request error as it should with any validation error that it stumbles upon: http://micropub.net/draft/#error-response

@voxpelli
Copy link

Reading up more on error responses it seems impossible for the endpoint to deliver a message to the client that tells it that the reason for the failure is due to the slug conflict – if one would add a field for a message suitable for the end user, similar to the error_description that's meant for devs, then that would solve this issue I think.

@aaronpk
Copy link
Member

aaronpk commented Sep 16, 2016

"slug" isn't defined by the Micropub spec, and isn't actually mentioned in the document at all, nor is it mentioned as a property of an h-entry.

There is some experimentation being done with "slug", for example Quill includes a field for it. However this is experimental, and may or may not end up in h-entry or Micropub as a result.

Regardless, systems that include a "slug" field typically take it as a suggestion, rather than as a unique identifier for the post. The "slug" is usually only part of the path of the URL, for example the common pattern in Wordpress sites of /{year}/{month}/{slug}. If the slug is part of a unique identifier for the post, Wordpress for example will append things to the end of the slug to make it unique.

I am closing this issue since it does not apply to Micropub at this time. Further discussion can take place on the IndieWeb wiki: https://indieweb.org/Micropub-brainstorming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants