It appears that FCKeditor is not compatible with the admins performance JSMin option turned on. The block appears in FF possibly other browsers as well except IE7. The text area becomes a very small text box like that which is described in the modules troubleshooting tips, however the remedies did not apply in this case. Once JSMin is enabled the FCKeditor enabled text box becomes a small text box. Disabling the JSMin performance option allows FCKEditor to function as expected.

Any tips to allow the combination to function together at this time?

Comments

wwalc’s picture

Ok... I did try to reproduce it in Drupal 6 and I think I found what's the problem, fortunately it seems it is not a big deal and that the same workaround will work in Drupal 5.
JSMin strips comments in javascript files, also conditional compilation statements, as a result in FCKeditor_IsCompatibleBrowser() the following code:

/*@cc_on!@*/false

(which evaluates to true in IE)
is simply changed into

false

Thus, the following code that is used to detect IE:

	// Internet Explorer 5.5+
	if ( /*@cc_on!@*/false && sAgent.indexOf("mac") == -1 )
	{
		var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
		return ( sBrowserVersion >= 5.5 ) ;
	}

is not executed.

Because fckeditor.utils.js is loaded after fckeditor.js (which contains the definition of FCKeditor_IsCompatibleBrowser), it is possible to overwrite this function in fckeditor.utils.js.

So, the final solution is:
- open sites/all/modules/fckeditor/fckeditor.utils.js
- paste this code at the end of file:

function FCKeditor_IsCompatibleBrowser()
{
  var sAgent = navigator.userAgent.toLowerCase() ;

  // Gecko (Opera 9 tries to behave like Gecko at this point).
  if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) )
    return true ;

  // Opera 9.50+
  if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 )
    return true ;

  // Adobe AIR
  // Checked before Safari because AIR have the WebKit rich text editor
  // features from Safari 3.0.4, but the version reported is 420.
  if ( sAgent.indexOf( ' adobeair/' ) != -1 )
    return ( sAgent.match( / adobeair\/(\d+)/ )[1] >= 1 ) ;  // Build must be at least v1

  // Safari 3+
  if ( sAgent.indexOf( ' applewebkit/' ) != -1 )
    return ( sAgent.match( / applewebkit\/(\d+)/ )[1] >= 522 ) ;  // Build must be at least 522 (v3)

  // Internet Explorer 5.5+
  if ( sAgent.indexOf("mac") == -1 && navigator.appVersion.match( /MSIE (.\..)/ ) )
  {
    var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
    return ( sBrowserVersion >= 5.5 ) ;
  }

  return false ;
}

(I hope it works correctly)
- clear cached data

Please check whether it works as expected and let me know.

wwalc’s picture

Status: Active » Fixed

Fixed in CVS. Check the dev release tomorrow.

rhylos’s picture

Dev fix tested on system. Looks good. Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.