Skip to content

[5.x]: Variant Overview has table fields that doesn't exist on the variant layout #15373

@white-lukas

Description

@white-lukas

What happened?

Description

I have 2 product types, which basically have the same fields.
On the variant index the custom fields are showing 2 times in the table columns, but 1 of them doesn't have any content of course.

And when selecting a table column to show on 1 product type, the same field will be shown on the different product type, but will always be empty

image

Steps to reproduce

  1. create 2 product types

  2. go to the variant index of a product

  3. the fields of the different variant layout will be shown on both (product)variant types

  4. select a field to show on the index

  5. go to the other product type

  6. the same field will be shown but won't hold any data

Expected behavior

Only the fields that are assigned to the product(variant) type should be visible in the table colums and when selecting a field to shown this should only be for this specific product type not for both/all

Actual behavior

All fields that are used in a variant layout are shown, and shown table columns are for all variants not just this specific type

Craft CMS version

5.2.5

Craft Commerce version

5.0.11.1

PHP version

8.3.8

Operating system and version

Ubuntu 24.04

Database type and version

mysql 8.0

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions