Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
thupsi opened this issue Apr 8, 2024 · 4 comments
Closed

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

thupsi opened this issue Apr 8, 2024 · 4 comments
Labels

Comments

@thupsi
Copy link

thupsi commented Apr 8, 2024

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

@brandonkelly
Copy link
Member

The columns are displaying incorrect values

I’m not able to reproduce that:

An entry index table, listing Boolean A and Boolean B values as expected based on the steps to reproduce

I was able to reproduce the second issue though, and that’s now fixed for the next release (5dd93e9).

@thupsi
Copy link
Author

thupsi commented Apr 9, 2024

You could not reproduce the first part, because there is an additional condition (I just discovered this one):

The first field (the non-overriden one) must be below the second field (the overridden one) in the field layout.

image

@i-just
Copy link
Contributor

i-just commented Apr 9, 2024

Thanks! I can reproduce it now, and I raised a PR for this.

@brandonkelly
Copy link
Member

Craft 5.0.3 is out with fixes for both of those issues. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants