Panels IPE block content edit form not loading with Drupal 10.2

Created on 10 January 2024, 10 months ago
Updated 24 July 2024, 4 months ago

Problem/Motivation

When trying to edit a Content Block (or adding a new Content block) using Panels IPE in Drupal 10.2 the edit form never loads.

No ajax errors are displayed in the console and no php errors displayed in logs either.

After step debugging with xdebug I've found that the error (that's not displayed in console nor in logs) was:

Fatal error: Access level to Drupal\panels_ipe\Form\PanelsIPEBlockContentForm::actions() must be public (as in class Drupal\block_content\BlockContentForm) in /var/www/docroot/modules/contrib/panels/panels_ipe/src/Form/PanelsIPEBlockContentForm.php on line 18

Steps to reproduce

Steps to reproduce

  1. Load any entity using panelizer with panels IPE
  2. Click on "Edit"
  3. Pick any block and click in the little pencil icon (to edit that content block entity)
  4. Note how you get the form title. Example "Edit existing "Test block" content", but the form does not load.
  1. Load any entity using panelizer with panels IPE
  2. Click on "Manage content"
  3. Click on "Create content"
  4. Pick a content block from the list
  5. Note how you get the form title. Example "Create new Test block content", but the form does not load.

Proposed resolution

Since PanelsIPEBlockContentForm is extending BlockContentForm I think the simpler solution would be to use the same function access level (public) and typehint the return value (array) in its actions() method.

Will open a MR with those changes and hopefully a maintainer can review.

πŸ› Bug report
Status

Closed: duplicate

Version

4.0

Component

Code

Created by

πŸ‡¦πŸ‡·Argentina anairamzap Buenos Aires

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