Problem/Motivation

While working on upgrades to Drupal 10 Upgrade status provided these errors as needing to be resolved manually:

FILE: web/modules/contrib/eu_cookie_compliance/eu_cookie_compliance.module

STATUS         LINE                           MESSAGE
--------------------------------------------------------------------------------
Check manually 162  Relying on entity queries to check access by default is
                    deprecated in drupal:9.2.0 and an error will be thrown from
                    drupal:10.0.0. Call
                    \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with
                    TRUE or FALSE to specify whether access should be checked.
--------------------------------------------------------------------------------

Proposed resolution

Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE

Comments

klimp created an issue. See original summary.

klimp’s picture

it-cru’s picture

Status: Active » Needs review

I've tested patch from #2 with upgrade_status 4.0 on D9.5.7 and missing accessCheck() is resolved, but I'm not sure, if accessCheck(TRUE) is to strict with permissions of domain entity from domain contrib module.

+1 from me for RTBC with open question to people who use domain contrib module.

svenryen’s picture

Status: Needs review » Reviewed & tested by the community

I confirm this works. I'll just take your word this is required. I'm not a domain module user myself, so I can't say whether it's beneficial for site owners that use domain_access.

  • svenryen committed f571dab8 on 8.x-1.x authored by klimp
    Issue #3352226 by klimp, IT-Cru, svenryen: Resolve access check errors...
svenryen’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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