Hi
I'm using 'commerce' & 'commerce auto product display' modules with 'field group'.
i made a new content type for product display and used field group for collecting some fields like Material, Dimensions, Weight and called that "Physical".

But when using 'commerce auto product display' to merge node type and entity type its not display.

commerce_apd_form_commerce_product_ui_product_form_alter function in file commerce_apd.module used "field_attach_form()" for attach product display node form to product entity form.

I think this function not support fieldset or 'field group' module.

Comments

mahyarsbt’s picture

I can fix my problem but i don't know this a good solution or not!

When using 'field_attach_form()' api fieldsets not displayed.
for example in 'commerce auto product display' module in my last post.

I added this code before 'field_attach_form()' for keep groups, fieldgroups and group_children:

		if (module_exists('field_group')) {
			$groups = $form2['#groups'];
			$fieldgroups = $form2['#fieldgroups'];
			$group_children = $form2['#group_children'];
			unset($form2['#groups']);
			unset($form2['#fieldgroups']);
			unset($form2['#group_children']);
		}

and after 'field_attach_form()' i used array_merge for put groups, fieldgroups and group_children to $form array:

		if (module_exists('field_group')) {
			$form['#groups'] = array_merge($form['#groups'], $groups);
			$form['#fieldgroups'] = array_merge($form['#fieldgroups'], $fieldgroups);
			$form['#group_children'] = array_merge($form['#group_children'], $group_children);
			$form['#pre_render'] = array_unique($form['#pre_render']);
		}	

this is work for me

jienckebd’s picture

#1 works!

Thanks for the clever solution -- saved me a lot of troubleshooting time. Not exactly ideal, but a good holdover.

Stalski’s picture

Status: Active » Fixed

Hi ,

I did a fresh install of commerce kickstart etc ... I added fieldgroups everywhere on a certain type and display. The problem was not there anymore.
A good guess (by zuuperman) that the patch in #2078201: Notices when using embedded field collections or Inline entity form multiple value widget could have solved that problem, I reverted the patch and tried it out. The fieldgroups were not rendered indeed.
So this was reproducable, but the problem is fixed in a fix this month, see patch https://drupal.org/files/2078201-27-fieldgroup_notice_flood.patch for people with with a lot of interest :)

- edit- this is fixed in dev and soon in the next release.

Thanks for the issue.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Correct spell