Undefined array key "status" in editor_form_filter_admin_format_submit() (line 257 of core/modules/editor/editor.module).

Created on 27 June 2024, 7 months ago

Problem/Motivation

After setup CKeditor5 in drupal 10.3

i get this error

Undefined array key "status" in editor_form_filter_admin_format_submit() (line 257 of core/modules/editor/editor.module).
editor_form_filter_admin_format_submit(Array, Object)
call_user_func_array('editor_form_filter_admin_format_submit', Array) (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('filter_format_edit_form', Array, Object) (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Setup ckeditor5 on https://localhost/admin/config/content/formats

🐛 Bug report
Status

Active

Version

10.3

Component
Editor 

Last updated 23 days ago

Created by

🇮🇹Italy trickfun

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

Merge Requests

Comments & Activities

  • Issue created by @trickfun
  • That means the editor settings on the form is not posting data about image upload settings. However, the form processing code doesn't carefully check this. Is this warning causing any functional problem on that site? Is the form modified by a custom or contributed module?

  • 🇮🇳India gauravvvv Delhi, India
  • 🇮🇳India gauravvvv Delhi, India
  • Status changed to Needs review 7 months ago
  • 🇮🇳India gauravvvv Delhi, India
  • Pipeline finished with Success
    7 months ago
    Total: 646s
    #210324
  • Should the Boolean expression be !isset($image_upload_settings['status']) || !$image_upload_settings['status'] instead?

  • Status changed to Needs work 7 months ago
  • 🇺🇸United States smustgrave

    Like the 3rd issue I've had to post this

    But for these kind of issue research needs to be done about why the field is empty. Putting just a check makes the warning go away but could be masking a larger issue.

  • 🇩🇪Germany fvd

    I have the same message: Warning: Undefined array key "status" in editor_form_filter_admin_format_submit() (line 257 of /web/core/modules/editor/editor.module)

    as I add a text format there: /admin/config/content/formats/

    The message comes from /admin/reports/dblog

    (Drupal core 10.3.1 php 8.3)

  • First commit to issue fork.
  • Pipeline finished with Success
    5 months ago
    Total: 372s
    #267859
  • 🇮🇳India rajeshreeputra Pune

    static patch for 11.0.1 version.

  • 🇺🇸United States mortona2k Seattle

    I had some formatters configured with Ace Editor that were throwing this warning.

    The config was exporting as:

    image_upload: {}

    The part that throws the warning is setting empty values to status: false, so I think it's either an intentional warning that some config is bad, or a false warning on an empty value.

    Is it an editor config's responsibility to set image_upload: {status: false} ?

    (looking at editor.schema.yml, it appears so)

Production build 0.71.5 2024