Errors on installation with Drupal 10 / PHP 8.1

Created on 19 January 2023, about 2 years ago
Updated 20 January 2023, about 2 years ago

Problem/Motivation

Errors when installing project on a Drupal 10 / PHP 8.1 project.

Steps to reproduce

* Drupal 10.0.1
* PHP 8.1
* Taxonomy Entity Index 1.11.0 or 1.x-dev

drush en taxonomy_entity_index

Error 1

Fatal error: Type of Drupal\taxonomy_entity_index\Commands\TaxonomyEntityIndexCommands::$logger must be ?Psr\Log\LoggerInterface (as in cl  
  ass Drush\Commands\DrushCommands) in /var/www/html/web/modules/contrib/taxonomy_entity_index/src/Commands/TaxonomyEntityIndexCommands.php   
  on line 13

Solution : remove $logger variable

Error 2

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

Solution: add a accesCheck to FALSE when using EntityTypeManager.

🐛 Bug report
Status

Fixed

Version

1.11

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs review about 2 years ago
  • Status changed to Fixed about 2 years ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024