Skip to content

[5.x]: "Edit entry type" action in cards triggers the wrong entry type settings slideout #17875

@mmikkel

Description

@mmikkel

What happened?

Description

If the edit page for an entry has a visible entry type selector (i.e. the entry belongs to a section or Matrix field with more than 1 entry type enabled), the "Entry type settings" action for any and all entry cards rendered within the edit page will trigger the owner/section entry's entry type settings slideout, not the settings slideout for the entry type used by the card entry.

This affects the "Entry type settings" action in entry cards in Matrix and Entries fields. It only happens if the edit page has a visible entry type selector.

Image Image

Steps to reproduce

  1. Create a section, and add two entry types to it.
  2. Add a Matrix field to one of the entry types. Use a third entry type in the Matrix field, and use the "Cards" view mode.
  3. Create an entry in the section, and add a nested entry to the Matrix field.
  4. From the section entry's edit page, open the nested entry's action disclosure menu via its card, and select "Entry type settings".
  5. Confirm that Craft opens the slideout for the owner entry's entry type, not the entry type used by the nested entry.

(6. Remove the second entry type from the section, and confirm that the "Entry type settings" action from the card's action menu now triggers the correct slideout).

Expected behavior

The "Entry type settings" action in entry cards should always trigger the settings slideout for the entry type used by the entry in the card.

Actual behavior

If the entry card is rendered in an edit page with a visible entry type selector field, Craft will open the slideout for the entry type used by the edit page's entry; not the entry type used by the card entry.

Craft CMS version

5.8.17

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions