Skip to content
Snippets Groups Projects
Commit 45de48fb authored by Peter Kok's avatar Peter Kok Committed by Andrei Ivnitskii
Browse files

Issue #3364566 by pkok, jaydenpearly, ivnish: Error " Entity queries must explicitly set..."

parent 90103ecc
No related branches found
No related tags found
1 merge request!6RC7 by jaapjan, jochemvn: fix update path issues regarding flag, entity...
......@@ -108,6 +108,7 @@ function mentions_entity_delete(EntityInterface $entity): void {
$mention_ids = \Drupal::entityQuery('mentions')
->condition('entity_id', $entity->id())
->condition('entity_type', $entity->getEntityTypeId())
->accessCheck()
->execute();
$storage_handler = \Drupal::entityTypeManager()->getStorage('mentions');
......@@ -130,6 +131,7 @@ function mentions_crud_update(string $type, array $mentions, string $id, string
$mention_ids = \Drupal::entityQuery('mentions')
->condition('entity_type', $type)
->condition('entity_id', $id)
->accessCheck()
->execute();
foreach ($mention_ids as $mention) {
$entity = $mentions_storage->load($mention);
......
......@@ -70,7 +70,7 @@ class Entity implements MentionsPluginInterface {
$entity_type = $settings['entity_type'];
$input_value = $settings['value'];
$query = $this->entityTypeManager->getStorage($entity_type)->getQuery();
$result = $query->condition($input_value, $value)->execute();
$result = $query->condition($input_value, $value)->accessCheck()->execute();
if (!empty($result)) {
$result = \reset($result);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment