Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The function field_group_field_group_pre_render pass settings for the elements js :
// Add all field_group format types to the js settings.
$element['#attached']['drupalSettings']['field_group'] = array(
$group->format_type => $group->mode,
);
Variable $group->mode returns 'default' instead of 'form' or 'view' options which are used in js code.
/**
* Implements Drupal.FieldGroup.processHook().
*/
Drupal.FieldGroup.Effects.processHtabs = {
execute: function (context, settings, type) {
if (type === 'form') {
Therefore all implementations of the Drupal.FieldGroup.processHook() don't work correct.
Comment | File | Size | Author |
---|---|---|---|
#2 | field_group-incorrect-settings-2643360-1.patch | 814 bytes | ozin |
Comments
Comment #2
ozinPatch attached, please check.
Comment #3
pixelmord CreditAttribution: pixelmord at Wunder commentedI came across this issue after I found the issue regarding the required field indicator:
https://www.drupal.org/node/2643558
This patch was noted there as prerequisite, so I applied this one before and it made the other patch work. I am not familiar with the reasoning behind these values for the drupalSettings affected by the patch, but for me this worked.
Comment #5
nils.destoop CreditAttribution: nils.destoop as a volunteer and at Wunder commentedThx for the patch. I adjusted it a bit so the js gets more info.
Comment #8
aspilicious CreditAttribution: aspilicious commented