Ticket #5952 (closed Bug: invalid)

Opened 4 years ago

Last modified 4 years ago

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

comment:1 Changed 4 years ago by fredck

  • Keywords Pending added

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

comment:2 Changed 4 years ago by maciej.wiercinski

  • Status changed from pending to closed
  • Resolution set to invalid

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy