Drupal 10 working version?

Created on 9 September 2023, 10 months ago
Updated 2 November 2023, 8 months ago

Problem/Motivation

Any chance of a working version for Drupal 10? I ran the Rector patch and the module installs okay, but on attempting to create and save a new Authorization Profile using Groups Consumer, I see a lot of errors:

The submitted value in the LDAP Server used in configuration. element is not allowed.

Warning: Undefined array key "mappings" in Drupal\authorization\Form\AuthorizationProfileForm->submitForm() (line 617 of modules/contrib/authorization/src/Form/AuthorizationProfileForm.php).

Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck(). in Drupal\Core\Entity\Query\Sql\Query->prepare() (line 141 of core/lib/Drupal/Core/Entity/Query/Sql/Query.php).

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡¦Saudi Arabia ishore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ishore
  • πŸ‡ΊπŸ‡ΈUnited States KarlShea Minneapolis, πŸ‡ΊπŸ‡Έ

    Unfortunately the only site I'm using this on is stuck on D9 until a couple of other minimally-maintained modules (group_outsider_in and radix_layouts) are also updated, so I don't really have a great way of testing this on D10 yet.

  • πŸ‡¨πŸ‡¦Canada Laura Johnson Toronto

    Over at the authorization module, they have a patch for these errors but they have not created a new release.

    See: https://www.drupal.org/project/authorization/issues/3327917 πŸ“Œ Drupal 10 patch (rector) Fixed

    You can get the updates by using the dev version:

    composer require 'drupal/authorization:1.x-dev@dev'

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    @ltrainjohnson,

    Maintainer of the authorization module. The issue was released on May 23rd, 2023. It is part of the 8.x-1.0 release of the authorization module.

  • πŸ‡¨πŸ‡¦Canada Laura Johnson Toronto

    @bluegeek9

    Sorry for the confusion! I just didn't have the most recent version of 1.0.

    So, make sure your authorization is updated and you should not see these warnings/errors.

  • πŸ‡ΈπŸ‡¦Saudi Arabia ishore

    Yes, our site was and is at Authorization 8.x-1.0. Maybe we've introduced other issues by being at PHP 8.2?

    I've been slowly going through the code trying to make it 10-compatible, and I've now stabilised the module enough to create an Authorization profile using authorization_groups. But still seeing other errors. More importantly, I'm not seeing any option to "Create Drupal Groups targets if they do not exist", which is what I was really looking for.

    For what it's worth, here are the changes I've made so far to GroupConsumer.php:

    < $groups = \Drupal::entityQuery('group')->execute();
    ---
    > $groups = \Drupal::entityQuery('group')
    > ->accessCheck(TRUE)
    > ->execute();
    94c96
    < if (/*($role->isMember() || $role->isAnonymous()) && */ $role->isInternal()) {
    ---
    > if (/* ($role->isOutsider() || $role->isAnonymous()) && */ $role->isMember()) {
    96c98
    < }
    ---
    > }

  • @bluegeek9 opened merge request.
  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    The accessCheck() is required for Drupal 10. Also, πŸ“Œ Automated Drupal 10 compatibility fixes Needs review , needs to be merged for Drupal 10.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    The line is not necessarily.

    $groups = \Drupal::entityQuery('group')->execute();
    

    ::loadMultiple() will return all.

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    @ishore,

    The current dev branch of authorization_group supports Drupal 10. Any issues?

  • πŸ‡ΈπŸ‡¦Saudi Arabia ishore

    Compatibility issue with my installed version of Group:

    Problem 1
    - drupal/authorization_group dev-1.x requires drupal/group ^1.0 -> found drupal/group[dev-1.x, 1.0.0-alpha1, ..., 1.x-dev (alias of dev-1.x)] but it conflicts with your root composer.json require (^3.2).
    - drupal/authorization_group 1.x-dev is an alias of drupal/authorization_group dev-1.x and thus requires it to be installed too.
    - Root composer.json requires drupal/authorization_group 1.x-dev@dev -> satisfiable by drupal/authorization_group[1.x-dev (alias of dev-1.x)].

    Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    Group 2 and 3 support is another issue. I hope to have that one resolved soon.

    πŸ“Œ New version for Group 2.0/3.0 compatability Active

  • πŸ‡ΈπŸ‡¦Saudi Arabia ishore

    I installed authorization_group:2.0.x-dev@dev, and this is working well, no error messages. I'm using core Core 10.1.6 and PHP 8.2.

    Is it possible to include the "Create Group targets if they do not exist" checkbox/logic?

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

Production build 0.69.0 2024