Javascript include issue with Xtemplate

Jorrit - July 8, 2007 - 21:20
Project:Htmlarea
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active
Description

I use an Xtemplate based template, and on certain pages htmlarea did not load, because drupal.js was not included in the header. I noticed that on some pages drupal_add_js was executed after xtemplate read the necessary html headers, so the Javascript include was never added. On other pages it did work. I did not try to find out why the execution order was different.

I changed htmlarea.module to have drupal_add_js('misc/drupal.js'); executed in the htmlarea_form_alter function. In this way, the javascript got included earlier, and as multiple drupal_add_js('misc/drupal.js'); calls do not result in multiple javascript files included, I guess this is a safe change.

I'm just posting this to let other users and the author know of this potential issue. I'm not that familiar with the Drupal codebase, so investigating this issue further would take too much time.

Drupal version: 4.7.6
Module version: 1.100 2006/10/31 23:26:43

 
 

Drupal is a registered trademark of Dries Buytaert.