Opened 15 years ago
Closed 12 years ago
#4352 closed Bug (fixed)
Ommiting the traling slash for a custom skin or plugin path results into unwanted behavior
Reported by: | Niek Kouwenberg | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description
I created a custom skin and plugin for the CKEditor. I placed these in a different directory as the CKEditor itself, and therefore I should add the path to the skin and plugin, like so:
// Adding the skin CKEDITOR.config.skin = 'myskin,/js/myskin/'; // Adding the plugin path CKEDITOR.plugins.addExternal('myplugin', '/js/myplugin/');
The code above works as expected, but when I omit either trailing slash weird things happen.
Looking at the HTTP requests, I can see CKEditor first tries to use the path as specified, and if no skin/plugin is found there, it tries the path with a trailing slash appended. I would expect the following HTTP requests:
/js/skins/myskinskin.js /js/skins/myskin/skin.js /js/plugins/mypluginplugin.js /js/plugins/myplugin/plugin.js
This should work fine, the skin and plugin should be found. But then the tricky bit comes into sight; the timestamp request parameter.
All requested URLs get the ?t=97KD parameter appended, to prevent caching. If this would work correct, the HTTP request would look like this:
/js/skins/myskinskin.js?t=97KD /js/skins/myskin/skin.js?t=97KD /js/plugins/mypluginplugin.js?t=97KD /js/plugins/myplugin/plugin.js?t=97KD
However, the timestamp will not be appended to the full URL to the Javascript files, but to the path:
/js/skins/myskin?t=97KDskin.js /js/skins/myskin/?t=97KDskin.js
For plugins it even gets appended twice, once to the path and once to the filename:
/js/plugins/myplugin?t=97KDplugin.js&t=97KD /js/plugins/myplugin/?t=97KDplugin.js&t=97KD
In addition to the problem above, the skin never seems to get the proper timestamp parameter when using a path with a trailing slash (whereas the plugin does):
/js/skins/myskin/skin.js /js/plugins/myplugin/plugin.js?t=97KD
Change History (2)
comment:1 Changed 15 years ago by
Milestone: | CKEditor 3.x |
---|
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have tried both: custom skin and custom plugin in latest CKEditor. I have also added timestamp to the page and configurations mentioned but skin was shown and plugin was loaded.
It looks like issue has expired on trunk.
Milestone CKEditor 3.x deleted