Translated shortcut set label results in access denied when customizing set

Created on 16 July 2020, over 4 years ago
Updated 27 January 2025, 8 days ago

When the label of the (default) shortcut set is translated, trying to customize it results in an access denied.

The url to customize the set is: /admin/config/user-interface/shortcut/manage/default/customize
The user has the correct permissions to update the set, but this still results in an access denied.

I traced it down to \Drupal\shortcut\ShortcutSetAccessControlHandler::checkAccess where the access check compares 2 objects. The problem is that the entity passed into the method is using the label in the default language (English) and the function shortcut_current_displayed_set returns a loaded shortcut set using the current language, which is Dutch.

I think comparing the id would be sufficient in this case.

ps. the param converter uses the 'loadOverrideFree' method on the storage object. This results in loading the shortcut set in the default language.

🐛 Bug report
Status

Closed: cannot reproduce

Version

10.3

Component

shortcut.module

Created by

🇳🇱Netherlands spadxiii

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands watergate

    This issue was closed, but we used this patch in our project. I've updated the patch of #2 to be applied to newer Drupal versions.

Production build 0.71.5 2024