If a (flexi)node contains fieldgroups, and is used as a flexifield in a main node, it seems its fieldgroups are rendered as fieldsets when editing the main node, but not in the view of the main node.

I've been trying to get to the bottom of this, but cannot find how flexifield calls up the (flexi)node fields to display the normal view.

Does anyone know if this is by design?

Comments

alpirrie’s picture

OK. After much toing and froing here is what seems like a neat solution, but I'd appreciate it if someone in the know can assess if this is an appropriate hack/fix.

In flexifield.module, edit function _flexifield_item_invoke_cck($sOperation, &$aItem, $oNode, $bTeaser = NULL, $bPage = NULL)

Just below:

    // Call the appropriate function from content.module.
    $f($oPseudoNode, $bTeaser, $bPage);

Add in:

    if (module_exists('fieldgroup')) { 
      fieldgroup_nodeapi($oPseudoNode, $sOperation, $bTeaser, $bPage);
    }

This passes the pseudo flexifield node through the fieldgroup module, adding any field groups into the view.

I've only done minimal testing so far, so will report back if anything weird starts happening.

memoo’s picture

#2 Did not work for me