apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
MIT License
4.35k stars 592 forks source link

Trashed page retains live slug on site using Workflow #2700

Open scabralo opened 3 years ago

scabralo commented 3 years ago

To Reproduce

Step by step instructions to reproduce the behavior:

  1. Create a Page and add some content to it
  2. Commit the page to live
  3. Trash the page
  4. Create a new page with the same name and add content to it
  5. Commit the page to live.
  6. Try to visit the new page using the same old slug

Expected behavior

I expected the trashed page to release the live slug/commit the new trashed slug so that the live slug could be reused.

Describe the bug

We have a site using Workflow for localization. When a page is trashed the Draft slug is updated to a trashed one, but the Live slug on the page remains attached to the trashed page. When we try to create a new page with the same name the new page uses the real slug on its Draft but the Live versions add a number at the end of the Slug. In order to solve this issue I have to go to the trashed page and Commit the new trash slug and liberate the live one.

Details

Node.js: v12.14.1

ApostropheCMS: v2.114.0

Server Operating System: I can reproduce the error on my local environment. MacOS Big Sur v11.1

boutell commented 3 years ago

Did you commit the change after moving the page to the trash?

On Mon, Jan 25, 2021 at 11:50 AM Sergio Cabral notifications@github.com wrote:

To Reproduce

Step by step instructions to reproduce the behavior:

  1. Create a Page and add some content to it
  2. Commit the page to live
  3. Trash the page
  4. Create a new page with the same name and add content to it
  5. Commit the page to live.
  6. Try to visit the new page using the same old slug

Expected behavior

I expected the trashed page to release the live slug/commit the new trashed slug so that the live slug could be reused.

Describe the bug

We have a site using Workflow for localization. When a page is trashed the Draft slug is updated to a trashed one, but the Live slug on the page remains attached to the trashed page. When we try to create a new page with the same name the new page uses the real slug on its Draft but the Live versions add a number at the end of the Slug. In order to solve this issue I have to go to the trashed page and Commit the new trash slug and liberate the live one.

Details

Node.js: v12.14.1

ApostropheCMS: v2.114.0

Server Operating System: I can reproduce the error on my local environment. MacOS Big Sur v11.1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe/issues/2700, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH27OCD7K7Q7JL4665XXLS3WOMVANCNFSM4WSBG3IQ .

--

THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER APOSTROPHECMS | apostrophecms.com | he/him/his