8000 url_key Slugs Not Globally Unique Across Products and Categories (Routing Conflict Risk) · Issue #10817 · bagisto/bagisto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
url_key Slugs Not Globally Unique Across Products and Categories (Routing Conflict Risk) #10817
Closed
@SumayyaThayyil

Description

@SumayyaThayyil

In the file ProductCategoryUniqueSlug.php, slug uniqueness is validated separately for products and categories. This allows a product and a category to have the same slug (url_key), which can cause routing issues, incorrect content resolution, or SEO conflicts on the storefront.

Steps to Reproduce:

Go to the admin panel.

Create a category with slug = summer-sale.

Create a product with url_key = summer-sale.

Visit /summer-sale on the frontend.

Routing conflicts or incorrect resolution occur — either the product or category will be served, not both.

Expected Behavior:

The slug (url_key) should be globally unique across both:

Product slugs (product_flat.url_key)

Category slugs (categories.slug)

This ensures:

No routing conflict

Predictable behavior on the frontend

SEO-friendly, canonical URL structure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0