Problem/Motivation

Fatal error when adding a short cut to a new custom shortcut set:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "entity:shortcut:my-shortcut-set" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 57 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php). 

Steps to reproduce

  1. Create a custom shortcut set (/admin/config/user-interface/shortcut).
  2. Within this custom shortcut set, add a shortcut ('+ Add shortcut' on /admin/config/user-interface/shortcut/manage/[custom-shortcut-name]/customize)
  3. When saving the shortcut, the error occurs.

The error does not occur when cache is cleared (drush cr) between step 1 and 2.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Sutharsan created an issue. See original summary.

cilefen’s picture

Priority: Normal » Major

PHP fatals are at least "major" priority.

cilefen’s picture

Confirmed! Thank you for adding the steps to reproduce.

larowlan’s picture

Issue tags: +Needs tests
cilefen’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

This minimal test catches the error.

larowlan’s picture

Assigned: Unassigned » larowlan

working on fix

larowlan’s picture

Assigned: larowlan » Unassigned
Issue tags: -Needs tests
StatusFileSize
new1.01 KB
new2.16 KB
larowlan’s picture

Title: Fatal error when creating a shotcut in a new shortcut set » Fatal error when creating a shortcut in a new shortcut set
larowlan’s picture

StatusFileSize
new722 bytes
new1.9 KB

Less noise

The last submitted patch, 5: fatal_error_when-2561201-5-test.patch, failed testing.

jibran’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Thanks for the fix @larowlan.

catch’s picture

Priority: Major » Critical

This is not hard to run into. Patch is already RTBC but I don't have time to commit now. Bumping to critical so this doesn't get forgotten (although I'm personally meh on shortcut module).

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

It is always amazing what we don;t have test coverage for.

Committed ea3432a and pushed to 8.0.x. Thanks!

  • alexpott committed ea3432a on 8.0.x
    Issue #2561201 by larowlan, cilefen, Sutharsan: Fatal error when...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.