Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301326

Fatal error when deselecting/reselecting an editor

$
0
0

Problem/Motivation

1) Go to admin/config/content/formats/add.
2) Add a test editor 'test_format' using CKEditor as the text editor.
3) Press 'Save Configuration'.
4) Go to /admin/config/content/formats/manage/test_format
5) Deselect CKEditor from the "Text editor" select dropdown
6) Select CKEditor from the "Text editor" select dropdown

Expected behavior: CKEditor subform appears
Actual: Ajax error

TypeError: Argument 1 passed to Drupal\Core\Form\SubformState::createForSubform() must be of the type array, null given, called in /Users/oknate/dev/d8test/web/core/modules/editor/editor.module on line 222 in Drupal\Core\Form\SubformState::createForSubform() (line 56 of /Users/oknate/dev/d8test/web/core/lib/Drupal/Core/Form/SubformState.php).

Proposed resolution

1) Verify subform exists before trying to validate it
2) There's actually a second bug here, which is it validates the CKEditor subform when switching to "None". So it should also check that the editor is not empty.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 301326

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>