I'm maintaining field_group_table and I'm having an issue that I can't seem to wrap my head around. I can't get nested Field Groups to work properly. Only the top level table works, and any fields in a nested group are rendered normally.

I'm currently implementing hook_field_group_pre_render(). Should I implement a different hook?

Comments

a.ross’s picture

Status: Active » Fixed

I figured out what the issue was. Turns out that changing the hierarchy of groups causes it to break in unpredictable ways. what I had to do instead was to leave the group's children intact until rendering. So I had to implement a theme function to work around this issue.

alexweber’s picture

Status: Fixed » Active

@a.ross could you please elaborate? I think I'm having a similar issue: #1995738: Pre-renders called in wrong order in field_group_fields_nest()

a.ross’s picture

My issue was the Field group Table module. Like I said, I was moving around the field groups in the render array hierarchy, which meant that the loop invoking pre render hooks for the groups in field_group_nest would fail.

a.ross’s picture

Status: Active » Needs work

Your patch probably isn't correct and serves only as a workaround in your specific case. Have you considered a group hierarchy more than 2 levels deep for example?

alexweber’s picture

@a.ross, yeah I'm aware that this is a stop-gap. I mostly uploaded the patch for use with my own makefiles :)

That said, this seems to be a common problem as per this comment.

What's the best way to work around this do you think?

a.ross’s picture

Status: Needs work » Fixed

Let's continue discussion over at the other issue.

Status: Fixed » Closed (fixed)

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