Getting this error message in FF console

ReferenceError: responsiveNav is not defined
responsive_navigation/responsive-nav.js line 17

What could be wrong with this line?
Drupal.responsive_navigation.blocks['navigation'] = responsiveNav("#nav", { // Selector: The ID of the wrapper

Tho, it seems like that the module's javascript conflicts with other module/s' script.

Comments

Katy Jockelson’s picture

Any joy with this?

Am having the exact same issue. Looking at the source code, I can't even see the responsive-nav.js being called so that explains it, but cannot work out what it is I'm doing wrong.

Help!?

jphelan’s picture

I have the same issue. Says it's installed but getting an:
Uncaught ReferenceError: responsiveNav is not defined

And viewing the source shows that responsive-nav.js is not being included.
Screenshot: http://d.pr/i/La3I

burnsjeremy’s picture

I had this same issue just a minute ago. I wanted to test out responsive navigation along with a few other solutions for an upcoming website. So I being the "lets get it done in a hurry" guy I am, must've skipped a step somewhere. I think I installed the module and then found I needed to install the library, and I got that same ref error after installing the library. So I cleared cache, ran update, and did a few other of the normal debugging procedures. Nothing fixed it, until....I uninstalled the module and reinstalled with the library already in place. When that was done there was no error. Just thought that may help someone.
Usual saying for drupal developers "keep calm, clear the cache" probably needs to have "slow down, and read the directions" added to it :)

Anonymous’s picture

Same issue here. Steps described at #3 did not help. Manually including JS solves this for me but there I'd like to get this fixed :)

bkonetzny’s picture

Had a newer version of responsive-nav.js installed which has a different version string and could not be parsed. Two issues here:

  1. .install detects only presence in the libraries array, but not if the library is actually installed.
  2. responsive_navigation.js is added, even if the library is not available, resulting in an JS error "responsiveNav is not defined".

I will add a patch to solve these issues.

bkonetzny’s picture

Issue summary: View changes
StatusFileSize
new2.03 KB
joelstein’s picture

Status: Active » Reviewed & tested by the community

The patch in #6 works for me. Thanks!

jrabeemer’s picture

Thanks for the patch, bkonetzny. I will test and commit if all works well.