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
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | cache_tools-entity.manager.jpg | 185.53 KB | elgandoz |
| #2 | 3193754-2.patch | 3.09 KB | elgandoz |
Comments
Comment #2
elgandoz commentedI'm not familiar on how to use GitLab in drupal.org, hence the patch. Is there any basic instructions?
Comment #3
elgandoz commentedComment #4
fagoComment #5
elgandoz commentedI'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:
Comment #6
fagothx, tested on a d9 site - works fine now. Will do some more testing before tagging a new release then.