We're getting this error on many pages of our site running Fusion 6.x-1.0, Skinr 6.x-2.x-dev, Jquery Update 6.x-2.x-dev, Acquia Marina 6.x-3.1:

Error: $("#primary-menu ul.sf-menu").superfish is not a function
Source File: https://www.campquest.org/sites/all/themes/customthemes/fusion/fusion_co...
Line: 63

I've turned off JS aggregation and flushed the cache, but the error persists. Any ideas?

Comments

jeremycaldwell’s picture

Often times issues like are due to running the jQuery Update module with it's updated jQuery script and an incompatibility with the jQuery provided by CiviCRM. Are you running CiviCRM on your site? And if so does the menu work correctly when you are on non-CiviCRM pages?

m.e.’s picture

Good guess -- the site is running CiviCRM, and it does appear that these errors are occurring only on CiviCRM pages, now that I look. Other parts of the site (incl. those using jQuery, such as with a dynamic display block) seem to be OK as nearly as I can tell (although I haven't tested every singe one).

Despite the error, the dropdown (primary) menu does appear to be working OK on CiviCRM pages....

...what I'm wondering, though, is whether this jQuery issue is in any way related to our SSL woes. See http://forum.civicrm.org/index.php/topic,18472.msg76723.html#msg76723

All media on CiviCRM pages is https yet there is something insecure causing SSL to fail, and CiviCRM to refuse to force SSL.

If you have ideas about this I'm all ears! Thanks for the response.

jeremycaldwell’s picture

Can you check your theme's JS files and see if the scripts are wrapped in tags like this:

Drupal.behaviors.acquia_slateRoundedCorner = function (context) { 
};

The Drupal behaviors method is used a lot in Fusion themes and since you are using CiviCRM you may need to modify it to work correctly. Have a look at this thread for more information: http://drupal.org/node/776308#comment-3449746

I know there are other instances of this problem in the issue queue for Fusion so have a look around too as there may be more helpful information to be seen. If you find a fix for it please let us know so I can mark this issue as fixed and make it easier for others to find.

m.e.’s picture

We're using Acquia Marina 6.x-3.1. Its .js file does use the Drupal behaviors; I don't see those tags in the jQuery corner .js file. I'm going to read the other thread now but will continue to look here for other suggestions. Thanks much!

m.e.’s picture

I've found some other threads but am a bit unclear what needs to be edited and where. Are you saying that the Drupal behaviors code in Acquia Marina needs to be changed, or something in CiviCRM? With so much interaction (Civi, Fusion, Skinr, jQuery UI, theme) I'm not quite sure whose issue it is or where to begin troubleshooting. Thanks in advance for any specific guidance you can offer.

stephthegeek’s picture

Status: Active » Postponed (maintainer needs more info)

m.e., this is something in CiviCRM... I seem to recall that there is an issue with it not implementing jQuery correctly for Drupal.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

If this is still an issue, it should probably be moved to the CiviCRM queue.