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

Duplicate slugs give an internal server error. #1369

Closed
Streammz opened this issue Oct 16, 2020 · 0 comments
Closed

Duplicate slugs give an internal server error. #1369

Streammz opened this issue Oct 16, 2020 · 0 comments

Comments

@Streammz
Copy link
Contributor

Problem
When you create a new post or page in the manager, and give it a slug that already exists (either by manually filling in the slug, or using a title that results in a slug being generated that is the same as another), then attempt to save (new posts/pages) or publish (existing posts/pages) this item, it results in a 500 (Internal Server Error) response from the respective API endpoint.

Because this is an internal server error, it looks like the 'saving' progress icon in these manager buttons are forever saving. The user doesn't know about this issue unless a console is opened.

Expected behavior
The manager API should return a StatusMessage instead, as it does with other caught problems, explaining that the specified slug is already in use.

Test case

  1. Open the Piranha Manager.
  2. Create a page with the title Test case,
  3. Save and publish this page.
  4. Create another page, also with the title Test case
  5. Attempt to save this second page, and watch errors appear in the browser console.
@tidyui tidyui added this to the Version 9.0 milestone Oct 16, 2020
@tidyui tidyui self-assigned this Dec 22, 2020
@tidyui tidyui closed this as completed in 8916ae4 Dec 22, 2020
@tidyui tidyui changed the title Manager: Duplicate slugs give an internal server error. Duplicate slugs give an internal server error. Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants