#4352: Ommiting the traling slash for a custom skin or plugin path results into
unwanted behavior
---------------------+------------------------------------------------------
 Reporter:  niek     |       Owner:              
     Type:  Bug      |      Status:  new         
 Priority:  Normal   |   Milestone:  CKEditor 3.x
Component:  General  |     Version:  CKEditor 3.0
 Keywords:           |  
---------------------+------------------------------------------------------
 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
 }}}

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/4352>
CKEditor <http://ckeditor.com/>
The text editor for Internet
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
FCKeditor-Trac mailing list
FCKeditor-Trac@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to