- Issue created by @Nelo_Drup
- 🇨🇴Colombia alejomc
+1, I also see this warning.
Warning: Undefined array key 0 in gutenberg_form_node_form_alter() (line 701 of modules/contrib/gutenberg/gutenberg.module). gutenberg_form_node_form_alter() (Line: 459) Drupal\Core\Extension\ModuleHandler->alter() (Line: 833) Drupal\Core\Form\FormBuilder->prepareForm() (Line: 280) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() (Line: 39) Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult() (Line: 95) Drupal\mercury_editor\Controller\MercuryEditorHtmlEntityFormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 54) Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle() (Line: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 53) Asm89\Stack\Cors->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 38) Drupal\mercury_editor\StackMiddleware\AjaxPageState->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709) Drupal\Core\DrupalKernel->handle() (Line: 19)
fyi: Layout builder and Mercury are not enabled on that content type.
- 🇨🇴Colombia alejomc
I've fixed this by adding a single formatted field ('body') with the "Gutenberg Blocks text format" to the content type.
I guess at some point this will be implemented however a message should be displayed instead if formatted text is not found.
public static function getEntityTextFields(FieldableEntityInterface $entity) { /* * TODO Make the Gutenberg text field configurable rather than searching for * the first formattable field. */
- 🇳🇴Norway vegardjo
I'm strongly assuming this is as a body field is not automatically added to a new content type in d11, as it was in d10 and before, and Gutenberg assumes the existence of this field, as that is what it takes over.
We should likely have a check for this and a message. On Gutenberg 4 I believe you configure Gutenberg per field rather than per node type, so it might not be relevant there.