AccessAwareRouter throws an AccessDeniedHttpException on AccessResultNeutral

Created on 17 January 2023, over 1 year ago
Updated 14 July 2023, about 1 year ago

Hello,
Couldn't quite figure out whether this is on purpose or not. Either need a fix or a helping hand :-)
Also not quite sure if this is about the path module or the routing system.

The base problem was the ValidPathConstraintValidator not allowing a webmaster to register a new translation for a node ; as the - copied from the node itself / default - alias field value is considered invalid.

Following the track, I've found the \Drupal\Core\Path\PathValidator::getPathAttributes catches the wrongly thrown AccessDeniedHttpException ; and therefore returns false.

As I'm far from a Drupal expert, these things are a mystery to me :
- within the accessAwareRouter, the accessManager::checkRequest will return an AccessResultNeutral in the node-form-field-validation context, but an AccessResultAllowed in a simple GET request context (same user, same route and params).
- an AccessResultNeutral results in an AccessDeniedHttpException.
- as far as it's a new translation, the alias will be newly created. So why checking on it and what permission does it depend on (apart from the 'link to any page' skipper i don't want the webmaster to have and the 'create url aliases' he already has) ?

Any help would be appreciated :-)

๐Ÿ’ฌ Support request
Status

Closed: outdated

Version

9.4

Component
Routingย  โ†’

Last updated 8 days ago

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance MBidinger

Live updates comments and jobs are added and updated live.
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.

  • Status changed to Postponed: needs info over 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    Unfortunately, thereโ€™s been no reply to this request in three months. Have you sorted this out? I read the post but I donโ€™t fully understand what it is you are asking.

    Timely responses to support requests in the Drupal core issue queue are rare. There are better forums for questions such a slack or stack exchange. I encourage you to try them.

  • Status changed to Closed: outdated about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen
Production build 0.71.5 2024