Not compatible with Drupal 10

Created on 24 August 2023, 10 months ago
Updated 11 September 2023, 10 months ago

Problem/Motivation

The last versions for 3.x (3.1.0) and 2.x (2.2.0) claim to be Drupal 10 compatible, but this is not the case.
I just upgraded a project to Drupal 10 with this module and it throws fatal errors because the entity queries were not adapted to explicitly use accessCheck().

Running upgrade_status for this module shows the following issues:

Scanned on Thu, 24/08/2023 - 11:58.
6 warnings found.

The patch in https://www.drupal.org/project/likeit/issues/3377496 🐛 Error when trying to delete entity Needs review fixes some entity queries, but not all.

Steps to reproduce

Install likeit (v3 or v2) on Drupal 9 and scan the module with upgrade_status.
Or use any function that uses an entity query.

Proposed resolution

Update entity queries to explicitly use accessCheck()

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs review

Version

3.1

Component

Code

Created by

🇧🇪Belgium Kobe Wright

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

Comments & Activities

  • Issue created by @Kobe Wright
  • @kobe-wright opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • 🇧🇪Belgium Kobe Wright

    Created a merge request with the required changes.

  • 🇧🇪Belgium Kobe Wright

    Also adding the patch for composer

  • 🇫🇮Finland HeikkiY Oulu

    Tested that applying with Composer works and it fixed the following error:

    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).
    

    +1 RTBC.

Production build 0.69.0 2024