Incompatible with Drupal 10.2

Created on 24 January 2024, 10 months ago

Problem/Motivation

Appears to be due to changes in the way the calls attribute in services files are done.

PHP Fatal error:  Uncaught Error: Call to undefined method Drupal\jsonapi_node_preview\EventSubscriber\ResourceObjectNormalizationCacher::setRenderCache() in /data/vendor/symfony/dependency-injection/ContainerBuilder.php:1673
Stack trace:
#0 /data/vendor/symfony/dependency-injection/ContainerBuilder.php(1166): Symfony\Component\DependencyInjection\ContainerBuilder->callMethod()
#1 /data/vendor/symfony/dependency-injection/ContainerBuilder.php(586): Symfony\Component\DependencyInjection\ContainerBuilder->createService()
#2 /data/vendor/symfony/dependency-injection/ContainerBuilder.php(531): Symfony\Component\DependencyInjection\ContainerBuilder->doGet()
#3 /data/app/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(105): Symfony\Component\DependencyInjection\ContainerBuilder->get()
#4 /data/vendor/symfony/http-kernel/HttpKernel.php(115): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#5 /data/app/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(63): Symfony\Component\HttpKernel\HttpKernel->terminate()
#6 /data/app/core/lib/Drupal/Core/DrupalKernel.php(688): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate()
#7 /data/vendor/drush/drush/src/Boot/DrupalBoot8.php(326): Drupal\Core\DrupalKernel->terminate()
#8 [internal function]: Drush\Boot\DrupalBoot8->terminate()
#9 {main}
  thrown in /data/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1673

There's no Drupal\jsonapi_node_preview\EventSubscriber\ResourceObjectNormalizationCacher::setRenderCache method, and Drupal\jsonapi\EventSubscriber\ResourceObjectNormalizationCacher has removed its method as well.

Steps to reproduce

  1. Start on a Drupal 10.1 site with this module installed or below
  2. Upgrade to 10.2
    1. Proposed resolution

      Add the setRenderCache method to Drupal\jsonapi_node_preview\EventSubscriber\ResourceObjectNormalizationCacher as a first pass. Alternatively, change the calls property of the service: see https://git.drupalcode.org/project/drupal/-/commit/fde6ee352ef791a674469... for what changed.

      Remaining tasks

      Generate patch. Likely to be incompatible with 10.1 and below.

      User interface changes

      None.

      API changes

      None.

      Data model changes

      None.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇺Australia geoffreyr

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024