Opened 14 years ago

Closed 14 years ago

#5952 closed Bug (invalid)

window.CKEDITOR_BASEPATH ignored

Reported by: Maciej Wiercinski Owned by:
Priority: Normal Milestone:
Component: General Version: 3.3.1
Keywords: Cc:

Description

I'm using PHP5 object to generate CKEditor instances. The resulting HTML is:

<script type="text/javascript">//<![CDATA[
window.CKEDITOR_BASEPATH='http://<url>/plugins/ckeditor/';
//]]></script>
<script type="text/javascript" src="http://<url>/plugins/ckeditor/ckeditor.js?t=A1QD"></script>

Not sure why's that a case, but in some circumstances window.CKEDITOR_BASEPATH is not visible from scope of the ckeditor.js (verified by alerting that variable, comes as undefined).

We've got around it by declaring it twice:

$ svn diff ckeditor_php5.php 
Index: ckeditor_php5.php
===================================================================
--- ckeditor_php5.php	(revision 14361)
+++ ckeditor_php5.php	(working copy)
@@ -454,7 +454,7 @@
 
 		// Skip relative paths...
 		if (strpos($ckeditorPath, '..') !== 0) {
-			$out .= $this->script("window.CKEDITOR_BASEPATH='". $ckeditorPath ."';");
+			$out .= $this->script("window.CKEDITOR_BASEPATH='". $ckeditorPath ."';var CKEDITOR_BASEPATH='". $ckeditorPath ."';");
 		}
 
 		$out .= "<script type=\"text/javascript\" src=\"" . $ckeditorPath . 'ckeditor.js' . $args . "\"></script>\n";

At least one affected browser:

Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1) Gecko/20090624 Firefox/3.5

Change History (2)

comment:1 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Pending added

That sounds really weird. Can you please provide us a test page we can use to confirm it?

comment:2 Changed 14 years ago by Maciej Wiercinski

Resolution: invalid
Status: pendingclosed

That issue was caused by our internal JScript combiner, and it is not a CKEditor bug.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy