The following causes problems with Javascript Aggregator. The aggregator is looking for the "?q=hovertip/settings_js'" and can not process it. Further more excluding it from the aggregator doesn't work as it is not a true js file.

/**
* Load the necessary javascript and stylesheet files.
* This was once an implimentation of hook_init, however one cannot
* reliably call drupal_add_css or drupal_add_js from that function.  So
* instead we call this function from hook_menu.
*/
function _hovertip_init() {
  drupal_add_css(drupal_get_path('module', 'hovertip').'/hovertip.css');
  drupal_add_js(drupal_get_path('module', 'hovertip') . '/hovertip.js');
  drupal_add_js('?q=hovertip/settings_js');
}

Changing the last line here fixes the problem.

/**
* Load the necessary javascript and stylesheet files.
* This was once an implimentation of hook_init, however one cannot
* reliably call drupal_add_css or drupal_add_js from that function.  So
* instead we call this function from hook_menu.
*/
function _hovertip_init() {
  drupal_add_css(drupal_get_path('module', 'hovertip').'/hovertip.css');
  drupal_add_js(drupal_get_path('module', 'hovertip') . '/hovertip.js');
  drupal_add_js(_hovertip_get_javascript(), 'inline'); 
}
CommentFileSizeAuthor
#1 hovertip-aggregator.diff1.26 KBDave Cohen

Comments

Dave Cohen’s picture

Category: bug » support
Status: Active » Needs review
StatusFileSize
new1.26 KB

There was a reason why I changed that line from doing an 'inline' to a regular add. I just can't recall what it was, and didn't log it properly when I checked it in.

I've been trying to test with Javascript Aggregator, but I can't get it to work. It litters my pages with messages like
warning: filemtime() [function.filemtime]: stat failed for yogadex/htdocs/misc/jquery.js in /home/dave/work/yogadex/profiles/custom/modules/javascript_aggregator/javascript_aggregator.module on line 49.

(It's looking for all files in the wrong place).

Anyway, here's the patch I'm thinking of checking in.

Dave Cohen’s picture

Status: Needs review » Fixed

Checked it in.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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