Skip to content

Blank Option Shown in Category Filter When "Create Default Empty Option" Is Enabled and Saved Empty ( attribute) #10851

@dheerajqa-webkul

Description

@dheerajqa-webkul

Terms

  • Before you openning this issue, i have checked if the issue has already been reported.

Bagisto Version(s) affected

2.3

Issue Description

When an attribute is created with "Create Default Empty Option" and no label is provided for the default option, a blank filter option appears on the storefront's category filter.

Preconditions

Admin is logged in.

At least one product category and product exists.

A dropdown-type attribute is created with "Create Default Empty Option" enabled and saved without entering any text for the default option.

Steps to reproduce

Navigate to Catalog > Attributes in the admin panel.

Edit attribute:

Add options.
Enable "Create Default Empty Option" but leave the label field empty.

Save the attribute.

Expected Result

The empty default option should not appear in the category filter if it has no label or value.

Actual Result

A blank filter option is shown in the category filters.

Screenshots

Screencast.from.30-07-25.04.12.01.PM.IST.webm

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions