Problem/Motivation
After upgrading drupal from 9.3.1 to 9.4.2 with jsonapi_extras version 8.x-3.21 and this patch applied: https://www.drupal.org/files/issues/2020-12-02/3042467-50.patch from https://www.drupal.org/project/drupal/issues/3042467
Resulted in Drupal throwing this error:
In ContainerBuilder.php line 1030:
You have requested a non-existent service "serializer.normalizer.content_entity.jsonapi". The https://www.drupal.org/files/issues/2020-12-02/3042467-50.patch patch both aliases and decorates the serializer.normalizer.content_entity.jsonapi which appears to work fine prior to drupal 9.4.2.
The supplied patch updates jsonapi_extras to decorate the alias instead and that allows drupal to bootrstrap once again.
To be honest I don't know why it works, but it does.
Steps to reproduce
I haven't had the chance yet to configure a core drupal with the appropriate patch.
But generally it should be.
* Install drupal 9.4.1
* Apply patch https://www.drupal.org/files/issues/2020-12-02/3042467-50.patch from https://www.drupal.org/project/drupal/issues/3042467
* Update drupal to 9.4.2
* run drush cr
Get this error:
In ContainerBuilder.php line 1030:
You have requested a non-existent service "serializer.normalizer.content_entity.jsonapi". Proposed resolution
Modify jsonapi_extras.services.yml to decorate the alias provided by the patch rather than the core service name.
Remaining tasks
Update https://www.drupal.org/project/drupal/issues/3042467 to reflect this the appropriate fix probably should be in that issue.
API changes
The core serializer.normalizer.content_entity.jsonapi is renamed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | non-existant-server-serializer.normalizer.content_entity.jsonapi-3308517-2.patch | 619 bytes | thursday_bw |
Comments
Comment #2
thursday_bw commentedIncoming patch
Comment #3
mxr576I am quoting my comment from #3042467: Support entities that are neither content nor config entities:
Comment #4
mxr576Update, update, the Core patch could have caused this issue: https://www.drupal.org/project/drupal/issues/3042467#comment-14940083
But when that core patch finally lands, the change in #2 becomes necessary.