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.
If I choose aggregate and compress javascript files, the ckeditor on text field disappears and we can't type anything.
If other text format is chosen which does not use ckeditor, we can type in text field properly.
Comment | File | Size | Author |
---|---|---|---|
#4 | ckeditor_aggregation-1940592-4.patch | 619 bytes | Wim Leers |
#1 | 1940592.ckeditor-aggregation.1.patch | 559 bytes | alexpott |
Comments
Comment #1
alexpottWhen ckeditors js is aggregated the path of the ckeditor file changes which breaks stuff... the specific JS errors are:
Basically ckeditor is loading these resources... and the path is being munged due to the fact aggregated files are saved to sites/default/files. One solution is to specify CKEDITOR_BASEPATH - see http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Specifying_the_Ed...
The patch attached does this - maybe not it the right way.
But also this suggests an interesting issue... should ckeditor's skins/moono/editor.css and lang/en.js be aggregated?
To test
Comment #3
alexpott#1: 1940592.ckeditor-aggregation.1.patch queued for re-testing.
Comment #4
Wim LeersI think a better approach would be to exclude CKEditor from aggregation. It's >400 KiB (ungzipped) on its own already, so that makes sense. It makes even more sense when you consider that CKEditor, when it would be part of other aggregates, would increase those aggregates with >400 KiB. Drupal's pretty poor aggregation system thus has the potential to cause CKEditor to be part of different aggregates.
Simple example:
- page A: foo.js + bar.js + CKEditor's JS = foobarcke.js
- page B: foo.js + baz.js + CKEditor's JS = foobazcke.js
Assuming foo.js, bar.js and baz.js are all 10 KiB when aggregated, we're now forcing the user who visits both pages to download 420 + 420 = 820 KiB instead of 20 + 400 + 20 = 440 KiB.
Comment #5
alexpottKnew is was doing it wrong... this is rtbc... but aggregation and gzip-ness should be separate - as proposed on #1926228-6: Performance page provides incorrect/incomplete information about CSS and JS compression
Comment #6
webchickThis actually sounds like a pretty bad bug. Glad it was easy to fix. :)
Committed and pushed to 8.x. Thanks!
Comment #7
Wim Leers.
Comment #8
Wim Leersd.o fail — "sprint" tag was not actually removed :/
Comment #9
Wim LeersSorry. I'm a pedant when it comes to writing :)