Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
- Create a custom shortcut set (/admin/config/user-interface/shortcut).
- Within this custom shortcut set, add a shortcut ('+ Add shortcut' on /admin/config/user-interface/shortcut/manage/[custom-shortcut-name]/customize)
- 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
Comment | File | Size | Author |
---|---|---|---|
#9 | shortcut-fatal-2561201.3.patch | 1.9 KB | larowlan |
| |||
#9 | interdiff.txt | 722 bytes | larowlan |
#7 | shortcut-fatal-2561201.2.patch | 2.16 KB | larowlan |
#7 | interdiff.txt | 1.01 KB | larowlan |
#5 | fatal_error_when-2561201-5-test.patch | 1.15 KB | cilefen |
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedPHP fatals are at least "major" priority.
Comment #3
cilefen CreditAttribution: cilefen commentedConfirmed! Thank you for adding the steps to reproduce.
Comment #4
larowlanComment #5
cilefen CreditAttribution: cilefen commentedThis minimal test catches the error.
Comment #6
larowlanworking on fix
Comment #7
larowlanComment #8
larowlanComment #9
larowlanLess noise
Comment #11
jibranLooks good to me. Thanks for the fix @larowlan.
Comment #12
catchThis 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).
Comment #13
alexpottIt is always amazing what we don;t have test coverage for.
Committed ea3432a and pushed to 8.0.x. Thanks!