Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
editor.module
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
28 Feb 2014 at 16:56 UTC
Updated:
3 Aug 2021 at 12:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Rajesh Ashok commentedCheck if filter format exists, before calling the member functions related to filter format.
Comment #2
Rajesh Ashok commentedComment #3
vastav commented#1 is working fine for me. Now i am able to add new text format with editor.
Comment #4
wim leers#2207777: Can not configure editor whilst creating a new text format was a duplicate of this one.
#1: thanks for working on this! :) And great to see it confirmed in #2 that this fixes the problem. But this still needs test coverage, so back to NW.
Comment #5
wim leersThis is a regression caused by #2204129: Store the filter format on the editor entity during runtime.
Test coverage added. Applied the same principle as #1, but I put it in a helper method that makes the code more legible than a
if ($object) {…}test.We did have test coverage for the generic use case at
EditorAdminTest::testAddEditorToNewFormat(), but in that case there was no code trying to do things based on the associatedFilterFormat. Therefore the new test coverage lives atCKEditorAdminTest::testNewFormat().Comment #6
wim leers#4 was silly, #2229801: Adding text format error for CKEditor is the duplicate.
Comment #8
wim leers5: text_editor_new_format-2207777-1.patch queued for re-testing.
Comment #9
gábor hojtsyLooks good to me, except:
This sounds dangerous, to allow all content by default if there was no filter?! What is the use case for this?
Comment #10
wim leers#9: that only happens on the form to configure text formats & text editors. Even then, it only happens if you create a new text format, and before saving that text format, you already associate a text editor.
Plus, this only applies to CKEditor's own filtering. It does not affect what's rendered to end users in any way.
Comment #11
gábor hojtsyAll right then. Looks good.
Comment #13
wim leersTrivial reroll after #2030605: Expand Editor with methods introduced some very minor changes.
Comment #14
webchickSorry, conflicts after CKE 4.4 :(
Comment #15
Anonymous (not verified) commentedIn Internal.php, generateAllowedContentSetting() was renamed to generateACFSettings()
Comment #17
wim leers#13 and #15 included the #2241235: Shortcut/ShortcutSet entity types should use cache tags patch by accident. Proper reroll.
Comment #18
wim leersBack to RTBC per #11. This only got marked NW because it didn't apply anymore after #2039163: Update CKEditor library to 4.4 landed.
Comment #19
alexpottCommitted bc5bfc9 and pushed to 8.x. Thanks!
Comment #21
wim leersComment #23
damondt commentedIt looks like there's a regression for this in Drupal 9. The ajax error is:
Comment #24
amanire commentedI am also seeing this behavior in Drupal 8.9.13.
Comment #25
tejasvi.c.h commented@damondt did you find any solution for this? I'm stcuk with this too.
Comment #26
amanire commented@tejasvi.c.h If I recall correctly, you have to first add and save the text format. Then go back and edit the CKEditor config.
Comment #27
crutch commentedD9 experienced the same #23, #26 is the workaround. Reopen and change to minor?