Collapsible fieldsets will appear in the edit form even if nested but if nested within a vertical tab, all collapsible fieldset markup disappears.

Comments

rgon’s picture

Priority: Normal » Major

Changed priority to major.

rgon’s picture

If the fieldsets are nested in a fieldset which is nested in a vertical tab, all the fieldsets show up in markup.

Stalski’s picture

Yes, I see what you mean. It is working, however core css for vertical groups is styling every fieldset inside their vertical vertical tab.
I will try to fix this in CSS and if not possible in a clean way, I'll will do it with javascript. With CSS I foresee problems to tackle all levels.

Stalski’s picture

This was a tricky one. As vertical tabs css from core puts all fieldset legends away, and the vertical panes css for margin, padding and border as well, I did not find another way to to try to override the css through javascript.
Reason is that selector in css ">" is not that well known in all browsers and it does not cover everything.
So I chose a javasdcript solution, adding a class that that puts the css for the seven theme back. So every theme will need to override that class too.
I did not see another way where people could override things (and without having a core issue)
I will file a core issue later but that usually takes a bit of time.

Stalski’s picture

Status: Active » Fixed

pushed in git as well.

rgon’s picture

I don't see it as just a style issue. My test shows that the fieldset elements are removed. I can see this in the page source using Firebug.

The test I made was to create a very simple site with a content type having a couple of added vertical tab field groups. I added custom CSS classes to the following fieldsets so I could easily identify them. Inside of those vertical tab field groups, I created a collapsible fieldset (outer) and inside that fieldset, two more fieldsets (inside-first and inside-second). Inside the innermost fieldsets were some simple text fields.

I opened a node edit form for this content type and opened the vertical tab with nested fieldsets. I saved the page source to a file. Then I removed fieldset 'outer' and saved the page source to a file. A diff shows that innermost fieldset elements are missing and the fields from fieldsets 'inner-first' and 'inner-second' are now all in adjacent divs within a div with class fieldset-wrapper which is direct descendent of the vertical tab fieldset.

I don't know if the fieldset elements not being created is caused by field group or vertical tabs module. I hope this explanation helps to troubleshoot this issue. Thanks for you work on this project.

Status: Fixed » Closed (fixed)

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

Fidelix’s picture

Status: Closed (fixed) » Needs work

I am facing the same issue.

I can reproduce this problem by simply creating a fieldset inside a vertical tab, and then adding a couple of items to this fieldset.

The fieldset is not generated.

Stalski’s picture

Status: Needs work » Closed (fixed)

Just test this and it works propertly in the dev version. In the stable release it did not work yet.

Stalski’s picture

and I hope I'll be able to release soon.

robcarr’s picture

I've just downloaded latest DEV (12 Oct 2011) and nested fieldgroups seems to be working again. Thanks

wizonesolutions’s picture

Status: Closed (fixed) » Needs work

Just downloaded the -dev version, have cleared the cache, and fieldsets are not working for me.

The set up I have is

Vertical tab group
---Vertical tab
------Fieldset
---------Field
---------Field
---------Field
------Fieldset
---------Field
---------Field
---------Field
---Vertical tab
------Field
------Field
------Field
TravisCarden’s picture

This looks like the core bug #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed. A workaround until it's fixed is to change the fieldset to a div from a custom module, like so:

/**
 * Implements hook_form_alter().
 */
function go_campaigns_form_alter(&$form, &$form_state, $form_id) {
  // Change Meta tags "Advanced" fieldset to a DIV pending resolution of
  // core bug at http:// drupal.org/node/1015798
  if ($form['metatags']['advanced']['#type']) {
    $form['metatags']['advanced']['#type'] = 'div';
  }
}
nils.destoop’s picture

Status: Needs work » Postponed
moniuch’s picture

Originally I used 2.x-dev and the field groups worked just wunderbar. At some point though I noticed that on the admin side, of the vertical groups (used to categorize fields to fill in) only the first one showed up, the rest of fields was unavailable. I then disabled the module and tried other available releases.

7.x-1.1 tar.gz (42.06 KB) | zip (47.81 KB) 2011-Oct-19 Notes
7.x-2.x-dev tar.gz (39.89 KB) | zip (44.94 KB) 2011-Dec-23 Notes
7.x-1.x-dev tar.gz (42.08 KB) | zip (47.8 KB) 2012-Jan-11 Notes

Unfortunately, seems like the system deteriorated ever since. Nothing helped - using other widgets, or providing extra vertical tab group as an enclosure - as in comment #12.

When trying to retrospect the changes that might have influenced the deterioration, it might have been introducing new fields, unless it is completely unrelated.

I really hope the module will be bug free, as it is for me a must-have, brilliant concept, and when it works, it works perfectly. Don't know why a field group it is not a core component.

moniuch’s picture

When one uninstalls field_group module (making sure that the field_group table gets dropped, the module folder is gone and the system table has no field_group record) - are there any other remainders of the module existence in other tables, for instance in nodes or field data? Or whatever, that might cause the site to remain "contaminated" with some module data?
If so, is there any SQL statement that one could execute on the db to get rid of such tidbits?
Asking, because, I would like to help and perhaps install other version afresh, and then take a closer look at what is happening. I suspect however that Drupal remembers "bad things" that had happened before with field_group.

nils.destoop’s picture

Only the field_group table is used. Field groups are loaded by ctools, so i suggest you also clear the cache.

moniuch’s picture

I am pretty sure I have done this gazillion times, as it is my first thought whenever something goes wrong.
Now I have re-installed FG 1.1 to give it yet another try and on a fresh install I'm now presented with:
Notice: Undefined index: form in field_group_field_ui_clone_field_groups() (line 782 of /sites/all/modules/field_group/field_group.field_ui.inc).
I don't want the discussion to drift off-topic, but I think something here really dislikes FG in my setup. I don't know why.

nils.destoop’s picture

The clone notice is a bug in FG 1.1. This is fixed in latest dev.
For the vertical tabs: maybe you can try this core patch? http://drupal.org/files/1015798-90-vertical-tab-legends_0.patch

Stalski’s picture

@moniuch : as I want to clean the issue queue up, can you give me the status of this issue? I can't figure out anymore what is wrong and what isn't.
I'll leave this open for a while, otherwise it might be best to start new issues for the new errors.

swentel’s picture

Status: Postponed » Closed (fixed)

Yes, let's reopen fresh issues when needed. Please make sure to test latest dev en latest core as those fieldset css should've been committed. Note, second branch may also disappear soon