Closed (outdated)
Project:
Views Accordion
Version:
7.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Sep 2012 at 14:07 UTC
Updated:
21 Mar 2017 at 09:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
michaelgc commentedI'm experiencing this issue as well. Running D7.
Comment #2
dalearyous commentedi solved my issue. to fix:
look at the source code of the page you are having the issue on. for me, my theme was set to use an older version of jquery found in an includes folder in the theme directory (typically for the menu). so naturally it was out of date. so what you will see in your source code is multiple script statements including various versions of jquery.
first, install the jquery update module. then, dig around until you find the line of code that is including the old version and remove it ... or replace it with new version.
Comment #3
raphael apard commentedI have this error on ajax request fired from a page that includes a view accordion.
To fix this issue, i added
if($.isFunction($(displaySelector +':not(.ui-accordion)').accordion))before jQuery UI accordion call.Comment #4
manuel garcia commentedThis is very strange, the error is basicaly saying that jquery.ui.accordion is not loaded, which is very weird.
@Raphael Apard:
This would prevent the accordion from executing thus not displaying the accordion if the plugin hasnt loaded for some reason.
In order words, this only lets it fail silently.
I'm having a hard time duplicating this problem, any pointers?
Comment #5
kscheirerBased on #4.
Comment #6
geek-merlini experience the same result but can see no js error. strange.
Comment #7
ksolis commentedI am having the same issue on D7. The accordion view works within the view preview but not on the page itself for the view. I have tried uninstalling and reinstalling with no solution. I've cleared all cache and nothing. I get the same message when I view the error from Firebug via FireFox:
Timestamp: 2/10/2014 10:47:12 AM
Error: TypeError: $(...).accordion is not a function
Source File: /sites/all/modules/contrib/views_accordion/views-accordion.js?n0sk1m
Line: 49
Line:49 is clearstyle: this.clearstyle
Drupal.behaviors.views_accordion = {
attach: function(context) {
if(Drupal.settings.views_accordion){
(function ($) {
$.each(Drupal.settings.views_accordion, function(id) {
/* Our view settings */
var usegroupheader = this.usegroupheader;
var viewname = this.viewname;
var display = this.display;
/* the selectors we have to play with */
var displaySelector = '.view-id-'+ viewname +'.view-display-id-'+ display +' .view-content';
var headerSelector = this.header;
/* Prepare our markup for jquery ui accordion */
$(displaySelector +' '+ headerSelector +':not(.ui-accordion-header)').each(function(i){
var hash = "#"+ viewname +"-"+ display +"-"+ i; // hash to use for accordion navigation option
var $this = $(this);
var $link = $this.find('a');
// if the header is not already using an anchor tag, add one
if($link.length == 0){
// setup anchor tag for navigation
$this.wrapInner('');
}
// if there are already, they wont be clickable with js enabled, we'll use them for accordion navigation
else{
// @FIXME ?
// We are currently destroying the original link, though search crawlers will stil see it.
// Links in accordions are NOT clickable and leaving them would kill deep linking.
$link.get(0).href = hash;
}
// Wrap the accordion content within a div if necessary
if (!usegroupheader) {
$this.siblings().wrapAll('
');
}
});
/* jQuery UI accordion call */
$(displaySelector +':not(.ui-accordion)').accordion({
header: headerSelector,
animated: this.animated,
active: this.rowstartopen,
collapsible: this.collapsible,
autoHeight: this.autoheight,
event: this.event,
fillSpace: this.fillspace,
navigation: this.navigation,
clearstyle: this.clearstyle
});
});
})(jQuery);
}
}
};
Here is the page with view (if needed) that displays everything instead of accordion view http://dev.suicidepreventionmessaging.actionallianceforsuicideprevention...
Any assistance would be greatly appreciated. Thank you KS
Comment #8
shankar javali commentedI faced this issue, i tried to find the solution adding patch and all, it didn't work. After thinking lot, I realize that is there resin for js library clash...? then i used the concept of jQuery.noConflict(), in my custom js code and removed all js library files, then it start working.
There is nothing problem in the module. It work fine for js version 1.7
Comment #9
santoshnath07 commentedI have problem in finding where the conflict occur. can anyone help?
I m using the mentor theme which has a jquery.js file.
how can i find which files are conflicting?
Comment #10
jaesperanza commentedStill an issue for some themes, posting in case it will help anyone.
@santoshnath07
In most cases this is due to conflicts with other jQuery scripts being used by the themes, or in some cases other modules. To troubleshoot:
Hope this helps!
Comment #11
manuel garcia commentedThis was raised against a now old release, closing it as outdated. Feel free to reopen if it you see it happening on the latest release, and follow @jaesperanza's steps