Skip to content

[5.x]: Multi-instance lightswitch issues in element index #14767

@thupsi

Description

@thupsi

What happened?

Description

I have encountered some buggy behaviour on a multi-instance lightswitch field.

First part of the issue is with the display of the field in the entry index table and second part is with inline editing on the same table.

Steps to reproduce

  1. Create a lightswitch field with label Boolean A and handle booleanA
  2. Create an section and inside it an entry type with this field. Leave the field label and handle unchanged.
  3. To the same entry type add a second instance of the field with label Boolean B and handle booleanB
  4. Create four entries with titles Boolean A, Boolean A AND Boolean B, Boolean B and None and in each entry configure the corresponding field values.
  5. Go to the section index and add those two fields as table columns.
  6. Try to edit the table inline.

Expected behavior

  1. The table columns should display the correct field values
  2. Both of those fields should be editable inline.

Actual behavior

  1. The columns are displaying incorrect values:

image

  1. Only one field is editable.

image

Craft CMS version

5.0.2

PHP version

8.3.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

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