This problem looks similar to #1436840: The module is not saving multiple field group entry
When I enter multiple rows and then preview the record, I get errors:
Notice: Undefined index: field_recommendation_type in field_group_multiple_field_group_pre_render() (line 169 of C:\Users\Adam.Browne\Sites\wce2\sites\all\modules\field_group_multiple\field_group_multiple.module).
Warning: Invalid argument supplied for foreach() in element_children() (line 6244 of C:\Users\Adam.Browne\Sites\wce2\includes\common.inc).
Warning: Invalid argument supplied for foreach() in field_group_multiple_field_group_pre_render() (line 180 of C:\Users\Adam.Browne\Sites\wce2\sites\all\modules\field_group_multiple\field_group_multiple.module).
If I save the record, none of the data displays - all I see is the label
If I open the record again to edit the node, all the fields are still full. and I see the error message above.
I've attached a screenshot of the edit fields - it's just 3x text fields for each row.
Comments
Comment #1
cezaryrk commentedhmm strange, I can't reproduce the error. I see were the error is thrown, but the value should be delivered be the 'field_group' module and must be set. Which version of 'field_group' and drupal are you using?
I tried simulate your configuration and it works fine, I attached my configuration screenshots.
Comment #2
cezaryrk commentedComment #3
adam_b commentedI'm using Drupal v7.12 and FGM 7.x-1.0-alpha4. Full module list attached.
Your screenshots look the same as mine - see attachments.
Not sure where that leaves us... :(
Comment #4
cezaryrk commentedOkay, I maybe found the problem.
I installed field_permissions module and when the grouped fields have permissions settings to private or public then the error isn't shown, but when I change to 'custom settings' then I've got it and the field isn't displayed.
I also get an exception in the field configuration when I try to change the field permissions back to private or public.
I found the issue http://drupal.org/node/1321050
Have you maybe set the field permissions of a grouped field to 'custom settings'? And can you change it back to private or public?
Comment #5
adam_b commentedSorry, that doesn't seem to be it - the permissions are "public" and always have been. I've just tried changing them to "private" but it made no difference, and I didn't get the exception that you've given above.
Comment #6
cezaryrk commentedI analysed this code and the only possibility that the notice is thrown, is that the field was removed by field_group_pre_render (which calls the function field_group_multiple_field_group_pre_render and pass through the three vars: $element, $group, $form).
A field is removed by field_group, if it is declared as not accessible, which means that some kind of module sets the field 'field_recommendation_type' as not accessible. The strange thing is that, the notice comes only for one field and not for all three fields and that the other fields aren't displayed.
If you change to an other group type like "Div" or "Fieldset" is the field_recommendation_type shown?
Currently I don't know if it is a problem in this module or of an other (your module list is very long ;), so there can be many possibilities ).
I corrected the code in alpha5, so the notice message shouldn't appear any more, but I doesn't solve your problem that the three fields aren't displayed. To solve this I need more information about the content of the three variables, which are passed to the function.
Comment #7
adam_b commentedIf you change to an other group type like "Div" or "Fieldset" is the field_recommendation_type shown?
How or where would I find the field_recommendation_type?
ETA: sorry, just realized you meant the error message.
I'll do some more testing this weekend (maybe on an installation without quite so many test modules...) and get back to you.
Comment #8
cezaryrk commented:) okay, thanks
Comment #9
adam_b commentedOkay, I created a new Drupal installation with only Field group multiple (alpha-6) and the required modules (Field group, and Chaos tools). I made a multiple fields container, using all the default settings with three single text fields in it (see screenshot).
Result is that the content doesn't appear, and there's a broken clearfix tag displayed (see more screenshots). When I changed the display to "multiple fields talble", the broken clearfix tag disappeared, but the content still didn't display.
There are no warning messages, but there are notices:
Notice: Undefined index: field_text1 in template_preprocess_field_group_multiple_container() (line 628 of C:\Users\Adam.Browne\Sites\mfg\sites\all\modules\field_group_multiple\field_group_multiple.module).Has anyone else tried this?
Comment #10
cezaryrk commentedThe clearfix error is solved in alpha7, some php compiler don't understand '<?=' as php brackets I change this, sorry for that.
The other problem that the fields aren't displayed, is the same as before. You currently didn't got the warnings because I added some empty checks to prevent this ;).
To understand what is going wrong, I need some outputs of variables in the function 'field_group_multiple_field_group_pre_render' in the field_group_multiple.module file.
Can you put the three code lines
in the file field_group_multiple.module at the Line 166 in alpha6 or alpha7, this code displays the three variables in textareas as drupal error message (after insert the three line, reload the page twice), can you attach the three outputs as txt files? After that remove the three lines.
Currently I didn't see an other option, because I can't reproduce this problem.
Example of adding the code:
Comment #11
adam_b commentedOkay, 3 lines added and errors duly appeared - output attached.
Comment #12
cezaryrk commentedSorry, for the delayed answer.
I did run some tests and I tried the same field configuration like yours, but it works fine. Also I simulated the output with the 3 variables values, but with the same result. The fields are displayed.
I currently have no answer and I didn't know a reason why the fields aren't displayed, everything look like it should :(
@All: Have someone else the same behaviour?
Comment #13
cezaryrk commentedA new version 7.x-1.0-alpha10 is online, I rewrote a lot of code, maybe it works now.
Comment #14
adam_b commentedSorry... still a problem.
The content displays if I have it set as div or fieldset, but the multiple-field options still just give the title but no display. There are no error messages any more, so no indication what's happening.
The source code for the multiple-field group setting is:
<div class="field-group-format group_mfg field-group-div group-mfg required-fields speed-fast effect-none"><h3><span>mfg</span></h3><div class="field-group-multiple-container clearfix"><div class="field-group-multiple-items"></div>For the multiple-field table setting, there's a bit more info which looks suspicious:
<div class="field-group-format group_mfg field-group-div group-mfg required-fields speed-fast effect-none"><h3><span>mfg</span></h3><div class="field-group-multiple-table"><?= $table ?></div>Sorry for the trouble. Unless someone else comes up with the same problem I guess there's not much more to do for the present.
Comment #15
cezaryrk commentedThat no trouble for me, I want that the module works for all :)
But as long as I can't reproduce it, I can only speculate what going wrong :(, but currently I am at my wit's end.
Thanks you for your patience, if I got a new idea I post a message her.
Comment #16
cezaryrk commentedOkay I was a little bit premature in the release creation of alpha10, some major bugs had slipped in.
The container was not displayed and the table '<?= $table ?>' I changed to '
print $table;'Sorry for that, maybe it works now with alpha11?
Comment #17
adam_b commentedSuccess!!! I'm glad to report that alpha11 works fine :)
Comment #18
cezaryrk commentedThat's great!!! :) Then enjoy this module :)
And thanks for the patience ;)