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.

Steps to reproduce gif

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.

CommentFileSizeAuthor
panels_create_and_place_block.gif831.36 KBanairamzap

Issue fork panels-3405276

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

anairamzap created an issue. See original summary.

anairamzap’s picture

Status: Active » Needs review
Issue tags: -JavaScript +JavaScript
anairamzap’s picture

Issue summary: View changes
Issue tags: -JavaScript +JavaScript
joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community
joseph.olstad’s picture

liam morland’s picture

joelpittet made their first commit to this issue’s fork.

joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Ok manually merged the MR because it wouldn't let me catch up the MR in the UI... thanks everybody for working on this and for the patch @anairamzap

liam morland’s picture

It seems the rebase button no longer appears in merge requests. Instead, one can rebase on the command line and then force-push.

Status: Fixed » Closed (fixed)

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

baluertl’s picture

Title: Panels IPE "placement" form for new blocks not loading in Drupal 10. » Panels IPE "placement" form for new blocks not loading in Drupal 10