I was getting Drupal.ajax is undefined on every page so I wrapped the ajax commands in a check to see whether Drupal.ajax is defined. This really needs testing as its just a quick fix for a problem that was annoying me but I haven't fully tested the repercussions.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | boxes-fix_for_Drupal.ajax_undefined-1482976-1.patch | 6.21 KB | tanc |
Comments
Comment #1
tancPatch attached. Also some minor style cleanup.
Comment #2
tancI've tracked down the issue to Admin module breaking Drupal.ajax. I think my patch can probably be ignored.
Comment #3
tirdadc commentedAlright, closing this since it's not tied to boxes specifically.
Comment #4
open social commentedOkay.. but this is an administration menu issue,.
I searched the issue queue but could not find anything.
The problem for me is like this:
Admin_menu enabled. Boxes and views enabled.
Loading the pages gives a drupal.ajax not found error.
boxes breaks at: Drupal.ajax.prototype.commands['getBlock'] = function(ajax, response, status) {
views breaks at: Error: Drupal.ajax is undefined
Source File: http://edv.local/sites/all/modules/contrib/views/js/ajax_view.js?m2xfuj
Line: 118
With no admin_menu it works fine.
Comment #5
open social commentedFound a fix for this.. it seems it is more a drupal issue or module specific.
When using something like this the misc js is loaded before the boxes/admin_menu module. Then things seem to be fine
Comment #6
farald commentedThe fix in #5 also works where other modules are causing the error, in my case Views Quicksand.