Skip to content

Reuse of Existing Slug Allowed #187

Open
@kmart-sgen

Description

@kmart-sgen

Bug Description
When creating a new blog post the user/author can select a slug name that is already in use. Doing so will cause the latest blog post content to load with that slug/URL, effectively replacing the existing blog post.

To Reproduce
Steps to reproduce the behavior:

  1. Sign in to Miniblog.Core
  2. Click on 'New post'
  3. Fill out all required fields, use "test" for slug
  4. Click on 'Save'
  5. Click on 'New Post'
  6. Fill out required fields with different data than step 3, use "test" for slug, again
  7. Click on 'Save'
  8. Click on either blog post created in step 3 or 6 and the content from 6 will load

Expected behavior
Creation of a blog post with an already existing slug/URL should not be permitted. Potentially solvable by displaying an error message to the user/author stating that a page with that slug name already exists, or automatically handle it by appending an integer to the slug name, incrementing by one as needed.

Screenshots
Example screenshots use "my_amazing_blog_post" as the slug.

First new post using "my_amazing_blog_post" as the slug.

2023-06-16_16-57-amaze-blog-post

Second new post using "my_amazing_blog_post" as the slug.

2023-06-16_16-58-im-captain-now

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions