Hello All,

This morning I upgraded to version 6.x-1.2, but YUI Editor stopped working altogether. Firefox reports a "YAHOO is not defined" error in a number of js scripts for that module.

I have reverted to the previous version of YUI for now.

Regards
Craig

Comments

davidc1969’s picture

It seems like when the print $scripts fires from the page.tpl.php file it does not pull the Yahoo DOM script before the java that initializes it.

My solution was to find the script tag in the output source and to copy it and paste it into page.tpl.php file, so it looks like this:

	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<script type="text/javascript" src="/themes/theme448/build/yahoo-dom-event/yahoo-dom-event.js?Z"></script>
	<?php print $head ?>
	<?php print $styles ?>
	<?php print $scripts ?>

coreyd’s picture

Version: 6.x-1.2 » 6.x-1.3

Problem with pasting that in is that I'm not sure the JS optimization will work properly. I got it to work fine in 1.3 by putting the head last in my page.tpl.php, like so:

<?php print $styles ?>
<?php print $scripts ?>
<?php print $head ?>

My site is relatively simple; $head contains just the stuff that yuimenu puts there and the icon link, so this may not work for everyone. But all the js rolls up properly so I only have one js file and drupal tells me I can do aggressive page caching now.