All is well except for I get the following errors when hovertip is enabled;

warning: filemtime() [function.filemtime]: stat failed for ?q=hovertip/settings_js in /home/openbior/public_html/bioreg/modules/javascript_aggregator/javascript_aggregator.module on line 49.

warning: file_get_contents(?q=hovertip/settings_js) [function.file-get-contents]: failed to open stream: No such file or directory in /home/openbior/public_html/bioreg/modules/javascript_aggregator/javascript_aggregator.module on line 68.

I have tried excluding hovertip from aggregation and can cofirm that it is not aggregating but the error remains.

Comments

nathanraft’s picture

Also... hovertip stops working. It uses a global include for the js set on the settings page. here is the code.

    // initialize tooltips in a seperate thread
    $(document).ready(function() {
      window.setTimeout(hovertipInit, 1);
    });
derjochenmeyer’s picture

just make sure... this is not an update issue? ... the version 1.3 of javascript aggregator was just released yesterday... did you try and have the same problem with version 1.2 ...

nathanraft’s picture

Not an upgrade problem...I have not tried 1.2...went straight to 1.3.

Thanks for the great module... just really need hovertip working to use this becuase I have text incorporated in so many places already.

derjochenmeyer’s picture

The problem is that hovertip does something very unusual. It adds a javascript snippet with drupal_add_js() function. Here is the code from the hovertip module. This is not a file ("?q=hovertip/settings_js") and thats causing the error...

/**
 * 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');
}

There are 2 things that you can try (try ONE of the both):

1. add ?q=hovertip/settings_js to the exclusion list of the js aggregator on admin/settings/performance

2. Hack the hovertip module and change the funtion above to the following just adding , $scope = 'inline'

/**
 * 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', $scope = 'inline');
}
nathanraft’s picture

I tried both of these and still get the error. I found this post for hovertip http://drupal.org/node/203088 and confirmed that using
drupal_add_js(_hovertip_get_javascript(), 'inline'); </code in the place of <code> drupal_add_js('?q=hovertip/settings_js', $scope = 'inline'); solved the problem. Have posted a bug report. Thanks for taking the time to look into this and to point me in the right direction.

robloach’s picture

Status: Active » Fixed

The the exclude rule to avoid aggregating hovertip.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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