Closed (fixed)
Project:
Fivestar
Version:
8.x-1.0-alpha4
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2023 at 15:52 UTC
Updated:
17 Oct 2023 at 20:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dkosbob commentedThe attached patch should fix the error, though I am not actually sure if the accessCheck should be TRUE or FALSE. The default is TRUE.
Comment #3
wxman commentedWould this be the reason my newly upgraded to D10 is now showing me this on a otherwise blank page:
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:
Something might not be working with the patch though because I don't see it being applied when I run composer update.
Comment #4
tr commentedSee the change record at Access checking must be explicitly specified on content entity queries
Yes, IMO the TRUE argument should be explicitly specified here even though it is the default because it acts as documentation - you immediately know when reading the code that an access check is going to be performed, whereas without the argument you can't tell whether there's even an argument available.
Comment #5
heddnincorporated #4 at time of commit. thanks for the fixes here.
Comment #7
wxman commentedIs the patch I said I am using in #3 still the correct one when using alpha4?
Comment #8
heddnyes.
Comment #9
wxman commentedThat 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.