The latest version of this module is causing the above error in my node editing form. I have some jquery with ajax calls on the node edit page and whenever I click a button that makes an ajax call, this error show up and prevents all other javascript from running on the page. I have disabled the module for now in order to continue working. But will have to go back to a previous version if I can't get this resolved.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amaria’s picture

I reverted back to version 1.1 and this error is gone.

bkonetzny’s picture

Same issue here when opening Overlay from Panels IPE.
Drupal.navbar contains much information but not the height property.
Uncommenting the "Support Tableheader displacement" section in navbar.module removes this issue, but obviously breaks the taeble header fix :)

amaria’s picture

Status: Active » Closed (cannot reproduce)

Closing this since the problem I was having seems to have disappeared after I wiped the directory and reinstalled version 1.2. Also, silly me, had a version of navbar in sites/all/modules and in the profile distribution.

bkonetzny’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Closed (cannot reproduce) » Active

Reopening this issue, as it's not fixed and still reproduceable on 1.3 as described in comment #2.

perfectweb’s picture

As in #2 and #4, I too am experiencing the same issue when using navbar and panels ipe (happens on all themes including Bartik).

perfectweb’s picture

Having looked into this a little bit more, it seems that the navbar_js_alter method (navbar.module) is only loading the navbar.tableHeader.js code if misc/tableheader.js is loaded.

The navbar.tableHeader.js is where the "height" method is defined.

In my situation misc/tableheader.js was not loaded, and therefore neither was the navbar-tableheader.js file. To fix this I simply commented out the code in navbar_js_alter and added navbar.tableHeader as a dependency of the navbar library (navbar_library method).

Below is the patch I applied to get this to work.

diff -rauB navbar/navbar.module navbar-update/navbar.module
--- navbar/navbar.module	2014-01-03 12:19:18.000000000 -0800
+++ navbar-update/navbar.module	2014-01-20 01:01:47.339759619 -0800
@@ -745,6 +745,7 @@
       array('navbar', 'navbar.announce'),
       array('navbar', 'navbar.displace'),
       array('navbar', 'navbar.menu'),
+      array('navbar', 'navbar.tableheader'),
     ),
   );
 
@@ -910,9 +911,9 @@
 function navbar_js_alter(&$javascript) {
   // Only load the tableheader offset script if the core tableheader script
   // is loaded.
-  if (isset($javascript['misc/tableheader.js'])) {
-    drupal_add_library('navbar', 'navbar.tableheader');
-  }
+//  if (isset($javascript['misc/tableheader.js'])) {
+//    drupal_add_library('navbar', 'navbar.tableheader');
+//  }
 }
 
 /**

So far, this seems to be working for me, but I'm not sure what side effects having this loaded at all times might cause. Hopefully someone who understands the module a little better might be able to advise.

amaria’s picture

Thanks for looking at this more deeply. I started experiencing this problem again after upgrading to 1.3. So I'm adding the missing js myself using drupal_add_js('misc/tableheader.js'); in hook_page_build(), if the user is in admin and has certain privileges. I think your patch is probably the way to go for navbar module though.

malberts’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
720 bytes

Increasing the Priority because this is making parts of the admin unusable.

In my case this happens when I'm trying to edit the styles settings of a View using the Table style - which is not an uncommon use case.

I'm attaching a proper patch for #6, but I'm not sure if this is the correct way to fix this.

philipz’s picture

This patch is working and looks simple enough for a proper fix. Thanks!

perfectweb’s picture

Fyi, I have been running this patch now for almost 2 weeks and haven't noticed any issues since enabling the patch.

Gary

joelstein’s picture

Status: Needs review » Reviewed & tested by the community

This patch solved the bug for me.

BarisW’s picture

Same here, patch fixes the bug (occurred in latest Drupal Commons when creating a node).

gmclelland’s picture

The patch in #8 fixed the conflicting problem I was having with navbar and the dragdropfile module at #2261077: Conflicts with the navbar module

Ravenight’s picture

patch #8 fixed this for me too - Taxonomy manager was not allowing multiple edits via ajax due to this.

jlporter’s picture

#8 fixed my issue as well. It seems firefox doesn't handle js errors as gracefully as chrome. Definitely broke several parts of the admin ui.

Please merge!

deviantintegral’s picture

This fixed an issue with Views style plugin options causing a JSON dump to the screen. The patch looks fine to me, so another +1 for this.

trigdog’s picture

I was also getting a JSON dump in Views when rearranging the fields. This patch fixed that. Thanks!

mrP’s picture

+1 RTBC

Was having same issue as #17 before applying patch in #8

mkhamash’s picture

dags’s picture

Confirmed. #8 works... but no need for an empty hook_js_alter(). Attached patch removes the whole hook function.

dags’s picture

Status: Reviewed & tested by the community » Needs review
AaronBauman’s picture

Status: Needs review » Reviewed & tested by the community

#20 works, is nearly identical to #8 with many reviews already.

RTBC - let's do it

dags’s picture

Actually, I came across #1937754: tableHeaderOffset not set / Sticky header overlayed by navbar, causes AJAX errors (ex: Views UI), which has a similar but possibly better patch (see comment #20 on that issue).

AaronBauman’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

so, closed dupe then?

RavindraSingh’s picture

If you are using version = "7.x-1.4" for navbar, you don't need to change or comment too many things, just need to add one more line here

array('navbar', 'navbar.tableheader'),

I was facing the problem with ctool popup so I did add a line of code.
Here is the attached patched as well.

Thanks,
Ravindra

Elijah Lynn’s picture

Here is the duplicate issue, there is a patch in #31 that resolved the issue for me.