Ticket #1614 (closed Bug: fixed)

Opened 19 months ago

Last modified 13 months ago

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

1614.patch (11.8 KB) - added by martinkou 13 months ago.
1614_2.patch (11.9 KB) - added by martinkou 13 months ago.

Change History

Changed 16 months 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.

Changed 13 months ago by martinkou

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

Changed 13 months ago by martinkou

  • owner set to martinkou
  • status changed from new to assigned

Changed 13 months 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 13 months ago by martinkou

Changed 13 months ago by martinkou

  • keywords Review? added

Changed 13 months 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 13 months ago by martinkou

Changed 13 months ago by martinkou

  • keywords Review? added; Review- removed

Changed 13 months ago by fredck

  • keywords Review+ added; Review? removed

Changed 13 months ago by martinkou

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [2073].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.