- Issue created by @dkosbob
The attached patch should fix the error, though I am not actually sure if the accessCheck should be TRUE or FALSE. The default is TRUE.
- last update
about 1 year ago 4 pass - πΊπΈUnited States wxman
Would this be the reason my newly upgraded to D10 is now showing me this:
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).
It's happening on every page that has fivestar on it. I'm using the alpha4 release, and added this to the composer.json:
"drupal/fivestar": { "#3391088 Entity queries must explicitly set": "https://www.drupal.org/files/issues/2023-10-02/fivestar-access-check-3391088-2.patch" },
Something might not be working with the patch though because I don't see it being applied when I run composer update.
- πΊπΈUnited States tr Cascadia
π Relying on entity queries to check access by default is deprecated in drupal:9.2.0. Closed: works as designed
Update should have been run before upgrading to D10 - update hooks by definition contain code that must work in the previous version.
The latest alpha4 release should not have changed compatibility with core because there are update functions that were never in a release.
- heddn Nicaragua
incorporated #4 at time of commit. thanks for the fixes here.
- Status changed to Fixed
about 1 year ago 2:26pm 3 October 2023 - πΊπΈUnited States wxman
Is the patch I said I am using in #3 still the correct one when using alpha4?
- πΊπΈUnited States wxman
That was my fault. The patch does work, I just formatted it wrong. Very fussy that composer.json is sometimes. The patch did apply and that error went away. I'm still left with one error, but I'm working on it.
Automatically closed - issue fixed for 2 weeks with no activity.