webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Duplicate page slugs/url

Open luckoseb opened this issue 3 years ago • 2 comments

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

luckoseb avatar Dec 25 '21 13:12 luckoseb

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.

brunozoric avatar Dec 27 '21 13:12 brunozoric

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.

webiny-bot avatar May 18 '22 07:05 webiny-bot