Problem/Motivation

After upgrading to version 2.7.0 with composer I got this message:
Argument 2 passed to Drupal\blazy\BlazyManagerBase::__construct() must implement interface Drupal\Core\Entity\EntityRepositoryInterface, instance of Drupal\Core\Entity\EntityTypeManager given, called in /xxx/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262

Comments

PROMES created an issue. See original summary.

gausarts’s picture

Thank you.

Is it 2.6 or 2.7 for sure?
Mismatched desc vs selection :)

Drupal version?

Does running update and clearing cache fix it?

saurabh-2k17’s picture

Hey @gausarts

I just upgraded it from 2.6 to 2.7 and experience the same error but after clearing the cache it was gone.

Current Drupal Version is 9.3.6

gausarts’s picture

Component: Code » Documentation
Category: Bug report » Support request
Status: Active » Fixed

@saurabh-2k17, thanks for confirming :)

Closing this as it appeared an obvious cache-clearing or update procedure issue.

Should you need more helpful info, check out the friendly bullet-proof update SOP, applicable for any module.

You can always access /admin/config/development/performance page to clear cache, if not drush cr will do.

There should be first time for everyone for everything.
Your report should still help new others nevertheless. Much appreciated.

Cheers.

promes’s picture

I am running D9.3.6 as well. The problem was: is wasn't logged in and then I have to update the settings first via the database to be able to run update.php And setting the settings back.
I removed blazy 2.7 and replaced it with 2.6. After logging installed 2.7 again and ran update.php.
Everything OK now.
Thanks.

StefanSpeterDev’s picture

Got the same issue when updating, drush cr via console fixed it!

smustgrave’s picture

I'm getting this too

Message TypeError: Drupal\blazy\BlazyManagerBase::__construct(): Argument #2 ($entity_repository) must be of type Drupal\Core\Entity\EntityRepositoryInterface, Drupal\Core\Entity\EntityTypeManager given, called in /app/webroot/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 in Drupal\blazy\BlazyManagerBase->__construct() (line 96 of /app/webroot/modules/contrib/blazy/src/BlazyManagerBase.php)
#0 /app/webroot/core/lib/Drupal/Component/DependencyInjection/Container.php(262): Drupal\blazy\BlazyManagerBase->__construct(Object(Drupal\Core\Entity\EntityRepository), Object(Drupal\Core\Entity\EntityTypeManager), Object(Drupal\Core\Extension\ModuleHandler), Object(Drupal\Core\Render\Renderer), Object(Drupal\Core\Config\ConfigFactory), Object(Drupal\redis\Cache\PhpRedis))

Which is causing pages to crash and drush cr doesn't seem to work.

Seems to conflicts with redis.

gausarts’s picture

Was the provided update run?
If not, try running /update.php via browser, not CLI.

Status: Fixed » Closed (fixed)

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