﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10335	Overwriting CKEditor with a different preset leads to a JavaScript error due to browser cache	Wiktor Walc		"It looks like there is a common scenario that is somewhat troublesome for users:

1. User downloads standard preset
2. User sees that the text color button is missing, so he downloads another preset OR std preset + colorbutton
3. The previous std preset is overwritten in the same location
4. 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!"")
5. ...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:

 * http://ckeditor.com/forums/Support/Full-package-doesnt-works-standartd-is-OK

'''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."	Bug	closed	Normal		General	4.0	duplicate		
