cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x]: `Actionable` Menu Items are Leaky

Open AugustMiller opened this issue 8 months ago • 1 comments

What happened?

Description

Fields can contribute action menu items that should appear in field layouts; the Matrix field uses this to provide a Copy all entries item.

However, Fields themselves are Actionable, meaning when they’re rendered as a chip, the field layout element-destined actions can appear out-of-context:

Image

I believe this only currently manifests with Matrix fields… but it points to a broader design/intent issue with getActionMenuItems().

Steps to reproduce

  1. Create a section and entry type;
  2. Create a Matrix field and add it to the field layout;
  3. Open the Settings slideout from the field layout element;
  4. Open the action menu on the field chip at the top of that view;

Expected behavior

Only actions intended for use with the field (Field settings and Copy field handle) are shown.

Actual behavior

All items returned by the field are shown.

Craft CMS version

5.7.10

PHP version

8.2.28

Operating system and version

macOS / DDEV

Database type and version

MySQL 8.x

Image driver and version

No response

Installed plugins and versions

No response

AugustMiller avatar Jun 05 '25 23:06 AugustMiller

Thanks August! PRs raised!

i-just avatar Jun 10 '25 08:06 i-just

Fixed in 5.7.11!

brandonkelly avatar Jun 24 '25 16:06 brandonkelly