PageBlockDisplayVariant::__sleep() is no longer compatible with parent signature from ctools leading to PHP fatals

Created on 12 June 2024, 10 months ago
Updated 25 July 2024, 9 months ago

Problem/Motivation

When we have updated the Ctools module to latest version which is 4.1.0 then I am getting the error "Fatal error: Declaration of Drupal\page_manager\Plugin\DisplayVariant\PageBlockDisplayVariant::__sleep() must be compatible with Drupal\ctools\Plugin\DisplayVariant\BlockDisplayVariant::__sleep(): array in /app/web/modules/contrib/page_manager/src/Plugin/DisplayVariant/PageBlockDisplayVariant.php on line 337".

Steps to reproduce

  • Update the both Page Manager and Ctools modules to the latest version.
  • Both the modules should be enabled and configured.
  • Visit any page on the frontend.
  • You will see the error message

Proposed resolution

Update the __sleep function inside the Page manager module
web/modules/contrib/page_manager/src/Plugin/DisplayVariant/PageBlockDisplayVariant.php to public function __sleep(): array

Remaining tasks

Create patch for the issue

🐛 Bug report
Status

Closed: outdated

Version

4.0

Component

Code

Created by

🇮🇳India someshver Panchkula

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