Problem/Motivation

After updating to Drupal 10.1.0, when I attempt to send a newsletter, it fails with this backtrace:

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()

Drupal\Core\Entity\Query\Sql\Query::prepare() core/lib/Drupal/Core/Entity/Query/Sql/Query.php:80
Drupal\Core\Entity\Query\Sql\Query::execute() modules/simplenews_stats/src/SimplenewsStatsEntityStorage.php:84
Drupal\simplenews_stats\SimplenewsStatsEntityStorage::getFromRelatedEntity() modules/simplenews_stats/src/SimplenewsStatsEngine.php:195
Drupal\simplenews_stats\SimplenewsStatsEngine::getSimplenewsStats() modules/simplenews_stats/src/SimplenewsStatsEngine.php:155
Drupal\simplenews_stats\SimplenewsStatsEngine::logHitSent() modules/simplenews_stats/src/SimplenewsStatsMailBase.php:203
Drupal\simplenews_stats\SimplenewsStatsMailBase::logHitSent() modules/simplenews_stats/src/SimplenewsStatsMail.php:46
Drupal\simplenews_stats\SimplenewsStatsMail::prepareMail() modules/simplenews_stats/simplenews_stats.module:31
::simplenews_stats_mail_alter() core/lib/Drupal/Core/Extension/ModuleHandler.php:545
Drupal\Core\Extension\ModuleHandler::alter() core/lib/Drupal/Core/Mail/MailManager.php:276
Drupal\Core\Mail\MailManager::doMail() core/lib/Drupal/Core/Mail/MailManager.php:180
Drupal\Core\Mail\MailManager::Drupal\Core\Mail\@closure() core/lib/Drupal/Core/Render/Renderer.php:583
Drupal\Core\Render\Renderer::executeInRenderContext() core/lib/Drupal/Core/Mail/MailManager.php:181
Drupal\Core\Mail\MailManager::mail() modules/mailsystem/src/MailsystemManager.php:70
Drupal\mailsystem\MailsystemManager::mail() modules/simplenews/src/Mail/Mailer.php:329
Drupal\simplenews\Mail\Mailer::sendMail() modules/simplenews/src/Mail/Mailer.php:385
…

Proposed resolution

Add the now-mandatory access check.

Remaining tasks

Review and merge MR.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Command icon 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

smokris created an issue. See original summary.

smokris’s picture

Assigned: smokris » Unassigned
Status: Active » Needs review
keshavv’s picture

Status: Needs review » Reviewed & tested by the community

Given MR works well. We can merge it.
Changing priority to Major, Please merge ASAP.

damien laguerre’s picture

Status: Reviewed & tested by the community » Fixed

Fixed, thanks!

Status: Fixed » Closed (fixed)

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