Error when placing blocks

Created on 28 September 2023, 9 months ago
Updated 12 October 2023, 9 months ago

Problem/Motivation

This looks like a really interesting module! I tried to place a block on a Node. It looks like it's triggering the following PHP error:

TypeError: Drupal\content_moderation\EntityTypeInfo::isModeratedEntityEditForm(): Argument #1 ($form_object) must be of type Drupal\Core\Form\FormInterface, null given, called in /var/www/html/drupal/core/modules/content_moderation/src/EntityTypeInfo.php on line 345 in Drupal\content_moderation\EntityTypeInfo->isModeratedEntityEditForm()
(line <em class="placeholder">380</em>
of <em class="placeholder">core/modules/content_moderation/src/EntityTypeInfo.php</em>
). <pre class="backtrace">Drupal\content_moderation\EntityTypeInfo-&gt;formAlter(Array, Object, &#039;lb_plus_place_block &#039;) (Line: 165)
content_moderation_form_alter(Array, Object, &#039;lb_plus_place_block &#039;) (Line: 545)
Drupal\Core\Extension\ModuleHandler-&gt;alter(&#039;form &#039;, Array, Object, &#039;lb_plus_place_block &#039;) (Line: 151)
Drupal\lb_plus\Controller\DropZones-&gt;placeBlock(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 591)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 166)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>

I wonder if this is because I have workflows enabled for the node type?

Steps to reproduce

  1. Install Drupal on 11.x using Umami install profile
  2. Enable LB Plus
  3. Try to place a block to a node, e.g. "Who's online" block.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @lauriii
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Tim Bozeman

    Tim Bozeman โ†’ made their first commit to this issueโ€™s fork.

  • @tim-bozeman opened merge request.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Tim Bozeman

    Just merging that little color picker fix. ๐Ÿ˜…

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Tim Bozeman

    Heya lauriii,

    Thanks for checking it out! There's been some changes this week. Are you still getting the same error? I do see some stuff that's broken on D11 like the color picker for the UI, but it seems like I can place blocks and stuff. Please see this little screen recording โ†’ of the setup. I did have to create a new content type. The ones the profile installed with are missing the "Allow each content item to have its layout customized" option in the manage display tab.

  • Status changed to Closed: outdated 9 months ago
  • ๐Ÿ‡ซ๐Ÿ‡ฎFinland lauriii Finland

    Thanks @Tim Bozeman! Seems to be working now ๐ŸŽ‰

  • @tim-bozeman opened merge request.
Production build 0.69.0 2024