- Issue created by @yivanov
- Status changed to Needs review
over 1 year ago 2:13pm 19 May 2023 - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,388 pass - 🇧🇬Bulgaria yivanov
The attached patches do not work, actually. I already tried this approach and it still didn't work. What works for me in fact is switching the route provider permission handler, as in my updated proposed resolution.
/** * Implements hook_entity_type_alter(). */ function my_module_entity_type_alter(array &$entity_types) { /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */ if (!empty($entity_types['block_content_type'])) { $entity_type = $entity_types['block_content_type']; $route_providers = $entity_type->getRouteProviderClasses(); $route_providers['permissions'] = 'Drupal\user\Entity\EntityPermissionsRouteProvider'; $entity_type->setHandlerClass('route_provider', $route_providers); } }
- Status changed to Needs work
over 1 year ago 3:03pm 19 May 2023 - 🇺🇸United States smustgrave
I don't think just removing the link/functionality is the solution.
@yivanov what version is your site on? Have you updated to 10.1 yet?
There were some changes to the permissions wonder if that helps or hurts. - 🇧🇬Bulgaria yivanov
I am on 9.5 currently, but I see that the 10.1 version is actually using the permission handler that I suggested.
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/blo...
I guess that solves it in future releases, so no need to do anything else here. I couldn't find existing issue with that particular problem, so hopefully this one will help if someone is wondering.
- Status changed to Fixed
over 1 year ago 7:26pm 19 May 2023 - Status changed to Closed: duplicate
over 1 year ago 8:37pm 19 May 2023