When the system.css_js_query_string value gets reset, it avoids having to hard-clear my browser's cached files in order to get updated JS. However, CKEditor uses its own cache-busting string, and the scripts loaded by CKEditor can get out of date when doing a deployment. It would be good to force CKEditor to re-use the same string.
Related issues:
ckeditor.module (for D7): #2679179: CKEditor uses separate cache-busting query string from Drupal's
wysiwyg.module (for D7): #2679106: CKEditor uses separate cache-busting query string from Drupal's
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2679903-ckeditor-reuse-cache-busting-query.patch | 1.84 KB | dave reid |
| #8 | interdiff-2679903-2-8.txt | 3.08 KB | thpoul |
| #8 | 2679903-8.patch | 3.1 KB | thpoul |
| #10 | 2679903-test-only-10.patch | 1.47 KB | thpoul |
| #11 | interdiff-2679903-8-11.txt | 2.24 KB | thpoul |
Comments
Comment #2
dave reidComment #3
wim leersNice! I never even thought about this, nor has it come up at all in the past few years. Even better integration between Drupal 8 and CKEditor.
Thank you very much! :)
Manually tested, works perfectly. Ideally this would get test coverage, but I'm not sure it's worth it in this case.
Let's link to http://docs.ckeditor.com/#!/api/CKEDITOR-property-timestamp
I prefer strict equality.
In Drupal 8, the fact that
core/ckeditornow has a dependency oncore/drupalSettingsmeans thatdrupalSettingsare *guaranteed* to be loaded beforecore/modules/ckeditor/js/ckeditor.js. Hence this does not need to happen in a Drupal behavior.So then it becomes just:
Comment #5
wim leersComment #6
wim leersActually, this should be quite straightforward to test:
$this->drupalGetSettings()that the setting sent with the page matches the current query stringdrupal_flush_all_caches()Comment #7
wim leersComment #8
thpoul commentedHere is a first test.
Comment #9
wim leersThanks, looks great! Just one question (besides the nits below): could you upload a test-only patch to show that the test indeed fails without the actual changes?
Missing
@see.s/Manually set the/Set the CKEditor/
s/Remove/Flush/
Comment #10
thpoul commentedHere is the test only patch, which should fail the test.
Comment #11
thpoul commentedAnd here are the nits :) Thank you for the review Wim!
Comment #13
wim leersLooks perfect!
Comment #16
catchCommitted/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!
Comment #18
wim leersRelated: #2702171: [upstream] CKEditor's Moono skin does not respect the CKEditor cache-busting query string when loading its icons sprite.
Comment #19
wim leersOops, didn't mean to remove a related issue.