Problem/Motivation

After upgrading to D9, the site break with the error Non-existent service "entity.manager" in CachewiseBlockViewBuilder()
This is not only because the enitiy.manager service was deprecated in 8.8 and removed in 9, but also the original EntityViewBuilder class (extended by BlockViewBuilder) has changed.

Steps to reproduce

Install Cahce Tools! 8.x-1.x-dev on a Drupal 9 installation.

Proposed resolution

Adjust CachewiseBlockViewBuilder to the EntityViewBuilder::createInstance() method

Remaining tasks

There is still some deprecated code, which does not work in Drupal 9.

 ------ --------------------------------------------------------------------- 
  Line   src/Plugin/views/cache/SanitizedCacheTag.php                         
 ------ --------------------------------------------------------------------- 
  92     Call to deprecated method getPublishedEntityTypeCacheTag() of class  
         Drupal\cache_tools\Service\CacheSanitizer.                           
 ------ --------------------------------------------------------------------- 

User interface changes

API changes

Data model changes

Comments

elgandoz created an issue. See original summary.

elgandoz’s picture

Status: Active » Needs work
StatusFileSize
new3.09 KB

I'm not familiar on how to use GitLab in drupal.org, hence the patch. Is there any basic instructions?

elgandoz’s picture

Issue summary: View changes
fago’s picture

Assigned: Unassigned » mostepaniukvm
Status: Needs work » Needs review
elgandoz’s picture

StatusFileSize
new185.53 KB

I'm a bit puzzled to see 2 very close "stable" releases, mainly aimed to Drupal 9 compatibility, while this module is definitively not compatible: Entity Manager was deprecated in 2015, being split in 11 classes, and removed completely in D9.

Currently enabling 8.x-1.3 or 8.x-1.4 on Drupal 9 with a custom cached block throws a WSOD, here with debugging on:

Cache tool error trace

fago’s picture

Status: Needs review » Fixed

thx, tested on a d9 site - works fine now. Will do some more testing before tagging a new release then.

  • fago committed d490531 on 8.x-1.x authored by elgandoz
    Issue #3193754 by elgandoz: Non-existent service "entity.manager" in...

Status: Fixed » Closed (fixed)

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