Opened 12 years ago
Closed 11 years ago
#10335 closed Bug (duplicate)
Overwriting CKEditor with a different preset leads to a JavaScript error due to browser cache
Reported by: | Wiktor Walc | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0 |
Keywords: | Cc: |
Description
It looks like there is a common scenario that is somewhat troublesome for users:
- User downloads standard preset
- User sees that the text color button is missing, so he downloads another preset OR std preset + colorbutton
- The previous std preset is overwritten in the same location
- User launches the attached samples and sees no changes, so he hits
F5
and the browser loads the new ckeditor.js ("Did you clear the cache? - Yes!") - ...aaand now the funny thing happens: the new ckeditor.js does not load the new language file, because the timestamp (used to solve caching issues) is still the same! This is because ckeditor.js has been created from the same version of core.
The result is that the first thing that requires new language entries throws a JavaScript error.
After downloading the full preset I got:
Uncaught TypeError: Cannot read property 'ltr' of undefined
After downloading the standard preset + colorbutton I got:
Uncaught TypeError: Cannot read property 'textColorTitle' of undefined
Sample reports that have not been identified properly:
- http://ckeditor.com/forums/CKEditor/CKEditor-4-not-working-in-Chrome
- http://dev.ckeditor.com/ticket/10183
plus possibly a mysterious issues like this one:
Proposed solution:
Stop using timestamp when requesting external resources. Start using a hash that is constructed using the same set of things that we use to cache packages generated with online builder:
- core version
- selected plugins along with their versions
- selected skins along with their versions
- selected languages
1) The hash could be calculated in CKEditor itself. But CKEditor has no idea about version numbers of included plugins plus it would add a bit of useless code to the package.
2) The hash could be generated by CKBuilder and added to ckeditor.js when generating the package (CKEDITOR.hash='xyz';
). All builds created online should be 100% safe this way.
The command line version of CKBuilder would not be able to use version numbers of plugins just like CKEditor, but still creating a different hash whenever a plugin is added to the preset would dramatically reduce the number of this kind of issues.
Change History (3)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | confirmed → closed |
Duplicate of #11625
I agree CKE should be as user-friendly as possible.
I have however one but. Pressing F5 or even Ctrl+F5 is not the way to clear cache in IE. Closing the page (or opening other page) and using top menu http://kb.wisc.edu/page.php?id=15141 is the way to do it:)