Problem/Motivation
An exception is thrown when installing the module in Drupal 10:
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).
Drupal\Core\Entity\Query\Sql\Query->prepare() (Line: 80)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 82)
Drupal\node_singles\Service\NodeSingles->checkSingle(Object) (Line: 36)
Drupal\node_singles\EventSubscriber\NodeTypeUpdateEventSubscriber->checkForSingles(Object) (Line: 93)
node_singles_entity_insert(Object, 'node_type') (Line: 52)
Proposed resolution
Add ->accessCheck() to all entity queries.
Issue fork node_singles-3354008
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
dieterholvoet commented