Changing node publish status throws EntityStorageException

Created on 16 September 2023, over 1 year ago

Problem/Motivation

When changing the publish status of a previously saved node, a Drupal\Core\Entity\EntityStorageException is thrown. This occurs whether the node was initially published or unpublished.

Making any other change while leaving the publish status the same works as expected (such as changing either of the promote options).

Steps to reproduce

1. Create and save a new node (tested with Page content type using default title and body fields).
2. Edit the node, changing only the publish status.
3. Click Save.

Expected: Node publish status changes successfully.
Actual: EntityStorageException is thrown with the following error:

"Drupal\Core\Entity\EntityStorageException: 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\Sql\SqlContentEntityStorage->save() (line 817 of /home/xxx/public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php)."

Version Information:

- Drupal: 10.1.3
- PHP: 8.1.23

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.1 ✨

Component
Node systemΒ  β†’

Last updated about 6 hours ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom Janner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024