Problem/Motivation
We have updated to Drupal 10.1.7 and trying to use the 'Export Using content types' to export content, but it throws a PHP error,
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 /var/www/opengroup.org/web/core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
So the module does not work at all in 10.1.7
Steps to reproduce
Install Drupal 10.1.7, and node export. Go to 'Content -> Export Nodes -> Using Content Type', and it throws an error
Proposed resolution
It looks like it is linked to : https://www.drupal.org/project/drupal/issues/3357368. So need to call Drupal\Core\Entity\Query\QueryInterface::accessCheck()
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #3
tyapchyc commentedAdded access check to query loads nodes of a selected content type.
Comment #7
bmagalhaes commentedHi!
It's works. Please, merge in 8.x-1.x branch and generate a new release.
Thanks.
Comment #8
uberhacker commentedIt didn't work for me but with the attached patch, it works. To apply the patch, add the following to your "patches" section in composer.json and then run composer install.
Comment #9
vinodjethwani commentedHello,
I applied the patch from comment #8 on my Drupal installation (version 10.1.1), and it resolved the issue successfully.
Comment #10
i-trokhanenko@vinodjethwani do not rush to close the issue, the patch is not yet committed!
Comment #12
i-trokhanenkoCommitted, thanks!