Error when placing blocks

Created on 28 September 2023, over 1 year ago
Updated 12 October 2023, over 1 year 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

Production build 0.71.5 2024