Panels IPE "placement" form for new blocks not loading in Drupal 10

Created on 30 November 2023, about 1 year ago
Updated 11 June 2024, 6 months ago

Problem/Motivation

In Drupal 10, the Block Content plugin category changed from "Custom" to "Content block" (https://git.drupalcode.org/project/drupal/-/merge_requests/3612/diffs#a1...).

The panels IPE module in the AppView > addContentBlock method is using a hardcoded string to set the
activeCategory for the block picker redenring autoClick.

Since the content block category name changed in Drupal 10, the active category doesn't get set, the blockPicker fails and thus the "placement" form is never loaded.

Attaching a gif showing the bug in a brand new D10 site using:

        "drupal/panelizer": "^4.5",
        "drupal/panels": "^4.7",

Steps to reproduce

  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. Fill-in any required fields in the block create form
  6. Click on "Create and Place"
  7. Here the "placement" form with the region dropdown should display, but instead of that we get the "Manage content" view.

Unfortunately no errors are displayed in the console, which made this tiny bug really really hard to find.

Proposed resolution

It would be much better to be able to pass the category from the created block, BUT since I'm not really good at javascript I'll just provide a MR changing the hardcoded category name to the D10 one.

Remaining tasks

If a maintainer wants to review and add a better solution (grab the category from the created block instead of hardcoding the category name) feel free to add it to the MR.

🐛 Bug report
Status

Fixed

Version

4.0

Component

In-Place Editor (IPE)

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