Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Using Edit 7.x-1.0, Drupal 7.26, CKeditor 7.x-1.13, CKeditor library 4.3.2
Changes made to your CKeditor profile do not update the quickedit toolbar until user permissions are altered.
Steps to reproduce:
- Logged in as admin user, CKeditor filtered html profile is set to use basic toolbar.
- Quick edit a page: Basic toolbar appears as expected.
- Alter CKeditor profile to use Full toolbar.
- Quick edit a page: It's still using the basic toolbar - problem
- Go to permissions, change any permission associated with the logged in user's role. E.g. Check / uncheck "Select method for cancelling own account" permission on authenticated user role.
- Quick edit a page: The Full toolbar is used as expected
Could be something to do with https://drupal.org/node/2178567
The behaviour should be documented in README.txt at least ...
Comments
Comment #1
Leo Pitt CreditAttribution: Leo Pitt commentedI have narrowed down the conditions for this, it seems that the toolbar does not update until user permissions are changed (even if the user permissions is entirely unrelated to edit).
For example:
Comment #2
Leo Pitt CreditAttribution: Leo Pitt commentedEdited in light of new info
Comment #3
Leo Pitt CreditAttribution: Leo Pitt commentedComment #4
Wim Leers#2178567: Backport: Use client-side cache tags & caching to eliminate 1 HTTP requests/page for in-place editing metadata, introduce drupalSettings.user.permissionsHash would indeed be my guess, but CKEditor toolbar configuration data is not cached there at all, so that makes no sense.
I'll have to try to reproduce this.
Comment #5
leeowen CreditAttribution: leeowen commentedI had a similar issue where I changed the text format for the body field (the toolbar was far too large for front end editing!).
But it didn't change on the front end. After inspecting the Session Storage it was clear that the toolbar was cached:
{"label":"Body","access":true,"editor":"ckeditor","aria":"Entity node 1, field Body","custom":{"format":"editor","formatHasTransformations":true,"ckeditorSettings":{"defaultLanguage":"en","toolbar":[["Styles","Image","Table"],["Bold","Italic","Underline","Strike"],["NumberedList","BulletedList","-","Outdent","Indent"],["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","Link","Unlink"]],"enterMode":2,"shiftEnterMode":1,"toolbarStartupExpanded":true...[trimmed]
Clearing the entry for this in the session storage fixed the issue. It is probably cleared by changing permissions in the admin also...
Comment #6
Wim LeersUgh, you're absolutely right! This is not a problem in Drupal 8, because in Drupal 8, the data stored in
window.sessionStorage
excludes the Text Editor settings; those are loaded independently.I'd say this is a very low priority issue because:
This should be fixed eventually, but for now, I have more important things to work on first. If a patch is posted, this will be fixed faster though.
The root cause is this:
Whereas the equivalent code in D8 does this:
Note the
ckeditorSettings
key in D7 that doesn't exist in D8. In fact, there already is a todo for this in the cited D7 code:That's exactly what needs to happen (move the
ckeditorSettings
part to::getAttachments()
), and that will fix this problem.