field_group.js, line 48:
wrapper.accordion({
is not a function

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nils.destoop’s picture

Status: Active » Postponed (maintainer needs more info)

browser and group setup?

codecouleurs’s picture

I have the same bug, the group title is not displayed and there is an error : wrapper.accordion is not a function
- there is no differences between browsers (Firefox, IE, Safari)
- no particular setup, I put "no effect" but nothing changes when I choose the other effect

thanks

nils.destoop’s picture

Can you maybe provide an url where i can check this? I think the accordion jquery file is not loaded for some reason.

jghyde’s picture

As a user, when viewing a node page with field_group's accordion feature, the accordions do not work and I receive the following error on the javascript debug console:

TypeError: wrapper.accordion is not a function

It points to line 48 of field_group.js

To check to see if the problem was that the ui.accordion library was not added, I added the following to a preprocess func in template.php:

<?php
drupal_add_library('system', 'ui.accordion');
?>

At that point, the accordion began working.

jghyde’s picture

FileSize
779 bytes

This patch fixes it. I initially tried to #attached the library, but didn't. This is just a brute force drupal_add_library() call and it works. Applied against 7.x-1.1.

jghyde’s picture

Status: Postponed (maintainer needs more info) » Needs review
yannickoo’s picture

Status: Needs review » Needs work
+++ b/sites/all/modules/field_group/field_group.moduleundefined
@@ -644,7 +644,10 @@ function field_group_pre_render_accordion(&$element, $group, &$form) {
+  ¶

Whitespaces

+++ b/sites/all/modules/field_group/field_group.moduleundefined
@@ -644,7 +644,10 @@ function field_group_pre_render_accordion(&$element, $group, &$form) {
+  ¶

Whitespaces again

jghyde’s picture

Status: Needs work » Needs review
FileSize
775 bytes

here is the space-less version

yannickoo’s picture

Status: Needs review » Needs work
+++ b/sites/all/modules/field_group/field_group.moduleundefined
@@ -644,7 +644,10 @@ function field_group_pre_render_accordion(&$element, $group, &$form) {
+  // Add the ui.accordion library

Sorry but every line comment should end with a ./?/!

yannickoo’s picture

Status: Needs work » Needs review
FileSize
508 bytes

#9 you didn't clone the Git repository from drupal.org so the path to field_group.module is wrong. Created a new version.

Bernsch’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

I use the version 7.x-1.x-dev from 2013-May-16 and the patch from #10 works finde!
Thanks yannickoo!

nils.destoop’s picture

Status: Reviewed & tested by the community » Fixed

Pushed to dev. Thx for the patch

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit d2bb588 on 7.x-1.x, 8.x-1.x by zuuperman:
    Issue #1473792 by jghyde, yannickoo | dking: Fixed accordion group bug.