webiny-js
webiny-js copied to clipboard
Duplicate page slugs/url
Version
5.19.1
Operating System
osx
Browser
chrome
What steps will reproduce the bug?
Create a page /main add content, publish.
Create a different page with the same /main slug
What is the expected behavior?
I can not overwrite original page with the same url. This is important for use cases when more than one user is editing them.
What do you see instead?
I am able to publish multiple pages on the same url
Additional information
No response
Possible solution
The valid workflow would be -> create new document, do not publish it right away, ask for a Title. Once the title is provided the slug is generated, while checking database for the same url and altering it in case there was already a page with the same name. Currently new documents are looking strange with default urls like /untitled-kxel43kc
It is made on purpose that you can override one page with another via the slug. The reason for that flow is:
- create a page on "/main"
- publish it
- create another page on "/main"
- publish it
Second page immediately replaces the first one. If there was a requirement to unpublish the page before setting a new one on the url, users will see a 404 page instead.
We will add a confirmation that page is already published on url that you are trying to publish on.
This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.