Problem/Motivation

When upgrading to Drupal 11.4 you receive a fatal error:

Fatal error: Type of Drupal\same_page_preview\Controller\PreviewPaneController::$formBuilder must be ?Drupal\Core\Form\FormBuilderInterface (as in class Drupal\node\Controller\NodePreviewController) in /app/web/modul  
  es/contrib/same_page_preview/src/Controller/PreviewPaneController.php on line 19

Change in core is from: https://www.drupal.org/project/drupal/issues/3339905

Steps to reproduce

Install Same page Preview module 3.0.0-rc1 on Drupal 11.3.
Upgrade to Drupal 11.4.
Run database updates via drush and receive a fatal error message.

Proposed resolution

Change how property type is declared in class, and pass the formbuilder service to the parent controller (NodePreviewController).

Remaining tasks

Create mr.
Test on Drupal 11.3
Test on Drupal 11.4
Test doing Drupal 11.3 - Drupal 11.4 upgrade.

User interface changes

None.

API changes

None.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jefflogan created an issue. See original summary.

jefflogan’s picture

I've tested on Drupal 11.3
I've Test on Drupal 11.4.0
And tested doing Drupal 11.3 - Drupal 11.4 upgrade.

Therefore these needs further review/testing, and then merging.

nicxvan’s picture

This worked for me as well on 2.1

cosmicdreams’s picture

agreed. merging.

cosmicdreams’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

linichalexey’s picture

StatusFileSize
new1.23 KB

If you landed here while updating to Drupal 11.4 and using same_page_preview v2.1, not 3.0.x, here is the patch rebased from the PR in that issue.

Status: Fixed » Closed (fixed)

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