Problem with multiple groups
Hi, my english is not good, I hope you can understand the problem that I have found.
I am developing a theme and in this process I needed two groups in different tabs, but only works correctly in the first tab, the second has a strange behavior:

my code:
$sections[] = array(
'icon' => 'eye-open',
'icon_class' => 'icon-large',
'title' => __('Our Services', 'redux-framework-demo'),
'desc' => __('Our Passion Settings
', 'redux-framework-demo'),
'fields' => array(
array(
'id'=>'ourServices-title',
'type' => 'text',
'title' => __('Our Passion Title', 'redux-framework-demo'),
'subtitle' => __('Our Passion Title', 'redux-framework-demo'),
),
array(
'id'=>'ourServices-subtitle',
'type' => 'text',
'title' => __('Our Passion Subtitle', 'redux-framework-demo'),
'subtitle' => __('Our Passion Subtitle', 'redux-framework-demo'),
),
array(
'id'=>'ourServices-parallax',
'type' => 'media',
'url'=> true,
'title' => __('Parallax Image', 'redux-framework-demo'),
'compiler' => 'true',
),
array(
'id'=>"group3",
'type' => 'group',//doesn't need to be called for callback fields
'title' => __('Group', 'redux-framework-demo'),
'subtitle' => __('Group Our Services.', 'redux-framework-demo'),
'desc' => __('No limit as to what you can group. Just don\'t try to group a group.', 'redux-framework-demo'),
'groupname' => __('Group Our Services', 'redux-framework-demo'), // Group name
'subfields' =>
array(
array(
'id'=>'ourServices-img',
'type' => 'media',
'url'=> true,
'title' => __('Image', 'redux-framework-demo'),
'compiler' => 'true',
/*'desc'=> __('Image.', 'redux-framework-demo'),*/
/*'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework-demo'),*/
),
array(
'id'=>'ourServices-url',
'type' => 'text',
'title' => __('Text', 'redux-framework-demo'),
'validate' => 'url',
/*'subtitle' => __('Here you put your subtitle', 'redux-framework-demo'),*/
/*'required' => array('switch-fold', '=' , '1'),*/
),
array(
'id'=>'ourServices-text',
'type' => 'text',
'title' => __('URL', 'redux-framework-demo'),
/*'subtitle' => __('Here you put your subtitle', 'redux-framework-demo'),*/
/*'required' => array('switch-fold', '=' , '1'),*/
),
),
),
)
);
$sections[] = array(
'icon' => 'eye-open',
'icon_class' => 'icon-large',
'title' => __('Our Passion', 'redux-framework-demo'),
'desc' => __('Our Passion Settings
', 'redux-framework-demo'),
'fields' => array(
array(
'id'=>'ourPassion-title',
'type' => 'text',
'title' => __('Our Passion Title', 'redux-framework-demo'),
'subtitle' => __('Our Passion Title', 'redux-framework-demo'),
),
array(
'id'=>'ourPassion-subtitle',
'type' => 'text',
'title' => __('Our Passion Subtitle', 'redux-framework-demo'),
'subtitle' => __('Our Passion Subtitle', 'redux-framework-demo'),
),
array(
'id'=>'ourPassion-parallax',
'type' => 'media',
'url'=> true,
'title' => __('Parallax Image', 'redux-framework-demo'),
'compiler' => 'true',
),
array(
'id'=>"group2",
'type' => 'group',//doesn't need to be called for callback fields
'title' => __('Group', 'redux-framework-demo'),
'subtitle' => __('Group Our Passion.', 'redux-framework-demo'),
'desc' => __('No limit as to what you can group. Just don\'t try to group a group.', 'redux-framework-demo'),
'groupname' => __('Group Our Passion', 'redux-framework-demo'), // Group name
'subfields' =>
array(
array(
'id'=>'ourPassion-img',
'type' => 'media',
'url'=> true,
'title' => __('Image', 'redux-framework-demo'),
'compiler' => 'true',
/*'desc'=> __('Image.', 'redux-framework-demo'),*/
/*'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework-demo'),*/
),
array(
'id'=>'ourPassion-url',
'type' => 'text',
'title' => __('Text', 'redux-framework-demo'),
'validate' => 'url',
/*'subtitle' => __('Here you put your subtitle', 'redux-framework-demo'),*/
/*'required' => array('switch-fold', '=' , '1'),*/
),
array(
'id'=>'ourPassion-text',
'type' => 'text',
'title' => __('URL', 'redux-framework-demo'),
/*'subtitle' => __('Here you put your subtitle', 'redux-framework-demo'),*/
/*'required' => array('switch-fold', '=' , '1'),*/
),
),
),
)
);
My code is wrong?? is an issue?
Could you be more specific when you say 'strange behaviour'? I'm not quite sure what exactly is wrong.
When I open the second tab (second image first post) the group layout is wrong, already is expanded and I can not collapse it, the reorder items function doesn't work and the "delete group" button is in an wrong place.
I think that I've found the problem:
in field_group.php line 78 I have added:
class=redux-groups-accordion
in field_group.js line 15: $(".redux-groups-accordion")
with the changes now all is working. In this moment I don't know if your are using the id "redux-groups-accordion" so I didn't remove it.
Hi,
I had the same issue.
I download the plugin from wp plugin repository yesterday and still had the issue. I was almost posting the issue, but did a quick search and got this post and fixing and manually made the changes as @elcrespo suggested.
And its working now.
I noticed this issue was closed 21 days ago.
Please check you have the latest update everywhere :)
Thanks for the awesome work.
Regards.
Just download the updated version from github.
And the same issue is happening again and even the mentioned fixings are not there.
I manually added the changes and its not working!
Please suggest.
Thanks.
I think its the issue with same id for multiple accordion.
But I am not seeing field_group.min.js in the group directory.
Sorry, my bad. Maybe tomorrow I Could take a look at this issue.
No problem. Thanks for helping me continuously.
I am creating a wp version using redux for one of my listed themeforest html item.
I choose redux after checking couple of frameworks but now the bugs are eating me!
But you are right, the fixing you made is ok and should work. Somehow the enqueue_dependencies is not responding properly.
I think I got it.
redux.min.js is loaded which includes all the js code of redux!!!
The included redux.min.js and redux.js is different! Not sure why its like this.
I unminify redux.min.js and searched for #redux-groups-accordion, changed it to .redux-groups-accordion and everything is working.
Wasted couple of hours to figure it out but happy as I can continue the wp theme development for now until I get stuck with the next bug!
Thanks.
Can you please check this fixing is not in the latest repo. Just downloaded and still have the same issue.
Lots of issues here and there specially in js.
Version 3 is not in a stable stage yet.