Jump to:
| Project: | Hovertips and Clicktips |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
using the latest version of hovertip seems to have introduced a conflict with Views Bulk Operations. when selecting checkboxes and selecting a bulk operation and submitting one of two errors occurs:
1. the form appears to get submitted, but instead of getting processed the view gets reloaded. no error messages.
2. the form gets submitted, but the following error appears: "An illegal choice has been detected. Please contact the site administrator."
anyone else seeing this problem?
The previous version of hovertip did not have this issue. The difference seems to be in the way hovertip_init() is called and the fact that the settings are called via an external URL, which, while the menu callback is specified not to cache, seems to have introduced some cache problems.
here is the difference in code I'm using:
// ORIGINAL HOVERTIPS
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');
}
// NEW (INCOMPATIBLE?) HOVERTIPS
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');
}
function hovertip_settings_js() {
drupal_set_header('Content-Type: text/javascript');
print(_hovertip_get_javascript());
return;
}
Comments
#1
We were having a different, though related problem with Hovertips.
For us, the problem was SSL. We had users who were getting browser warnings about unauthenticated content in the ssl portions of our site because of the "?q=hovertip/settings_js" url.
We had to get things fixed immediately, so as a quick workaround we put the settings_js javascript in a file (settings.js) in the module directory and added it using the same drupal_add_js style as used for hovertips.js.
This took care of our problem, but of course it disables the ability to change the javascript through the admin interface (not an issue for us). It'd be nice to have it fixed correctly.
#2
We had a similar problem with js aggregation not working due to a conflict with the
drupal_add_js('?q=hovertip/settings_js');. The original code above works fine though. Any reason not to revert to that method?#3
Will create a new big for this one.
#4
http://drupal.org/node/249430
I'm hoping that fix resolves this issue as well. Thanks everyone.
#5
Automatically closed -- issue fixed for two weeks with no activity.