Opened 9 years ago

Closed 8 years ago

#1614 closed Bug (fixed)

Difference between FCKConfig.BasePath and .FullBasePath

Reported by: alfonsoml Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.6.2
Component: General Version:
Keywords: Confirmed Review+ Cc:

Description

In editor/source/internals/fckconfig.js the FCKConfig.BasePath and FCKConfig.FullBasePath are calculated automatically, for file:// they both end up being the same, but for the rest of the protocols .BasePath doesn't contain the reference to the protocol and the host.

This usually works, but for chrome:// it fails to load any file referenced by .BasePath It is enough to make FCKConfig.BasePath = FCKConfig.FullBasePath to get the editor loading the stylesheets, so I wonder if the distinction between the two settings is really needed or we could add the reference to protocol and host to .BasePath and get rid of FullBasePath replacing it wherever it appears with .BasePath

Attachments (2)

1614.patch (11.8 KB) - added by martinkou 8 years ago.
1614_2.patch (11.9 KB) - added by martinkou 8 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 years ago by fredck

  • Keywords Confirmed added; Discussion removed
  • Milestone set to FCKeditor 2.6.1

The theory sounds reasonable. We must check all references to BasePath to ensure it can be replaced with the value use in FullBasePath.

I'm targeting it to the 2.6.1 for investigation.

comment:2 Changed 8 years ago by martinkou

The use of BasePath is causing problems when FCKeditor is installed to a different subdomain. See #2241.

comment:3 Changed 8 years ago by martinkou

  • Owner set to martinkou
  • Status changed from new to assigned

comment:4 Changed 8 years ago by martinkou

I've done a review of the files that depend on FCKConfig.BasePath:

  1. fckconfig.js - used for locating the editing area CSS, skin related CSS/images/scripts, and the upload and file browser's server side scripts.
  2. _samples/html/sample*.config.js - used for location plugins and CSS files.
  3. editor/plugins/dragresizetable/fckplugin.js - used for locating a .gif file.
  4. editor/dialog/common/fck_dialog_common.js - I don't really know what the path is for here... it's embedded in a minified CSS string?
  5. editor/_source/internals/fckdebug.js - used for locating the HTML file that displays debug messages.
  6. editor/_source/internals/fckconfig.js - used for setting FCKConfig.EditorPath, which in turn is only used for loading the style and template .xml files.

I've done some tests today with setting a full path (with http://) to the BasePath in sample01.html, and testing the functionalities listed above, and so far I haven't seen anything abnormal.

Changed 8 years ago by martinkou

comment:5 Changed 8 years ago by martinkou

  • Keywords Review? added

comment:6 Changed 8 years ago by fredck

  • Keywords Review- added; Review? removed

There is an extra "+ '/'" at line 47 in fckconfig.js. It's duplicating the slash after the host name. For example, the following is the BasePath value I'm having locally:

http://dev.fckeditor.local//fckeditor/editor/

Other than that, I would not simply remove FullBasePath from the code. I would leave it as an deprecated alias to BasePath. It may be used on plugins out there.

Changed 8 years ago by martinkou

comment:7 Changed 8 years ago by martinkou

  • Keywords Review? added; Review- removed

comment:8 Changed 8 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:9 Changed 8 years ago by martinkou

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [2073].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy