My Setup
I have a multigroup containing a filefield cck (image specifically).
I have select an image cache (or just a normal image, or filepath, etc) in the "Display Fields" of my content type / filefield.

Expectation
Normally when viewing the node, I will see $node->field_image['view'] and it will be the value as determined by "Display Fields" in my content type field settings.

Result
The $node->field_image['view'] is not there. No, 'view' is found in the field_image array, regardless of what display option I choose. (imagecache, filepath, simple image, etc)

When I move the field_image out of the multigroup and the $node has popular field_image['view']s

THANKS!
p.s I'm not sure how I can figure out exactly what version of cck I'm running, but I am running a fairly recent (last month or so) 3.x-dev.

Comments

karens’s picture

Status: Active » Fixed

The crux of this problem is that we had a difference in the way that multigroups are laid out compared to other fieldgroups. I added the use of content_get_nested_elements() to find the right place to add the 'view' no matter whether this is a field, a fieldgroup, or a multigroup instead of the current logic that worked for fields and normal fieldgroups but not for multigroups.

As a part of this change I found one place that the mulitgroup was still inconsistent with a normal fieldgroup, even if you successfully retrieved the right element. We had been forcing all multigroups to be created with an arbitrary delta of '1' and I switched that back to use the correct delta.

With these changes the 'view' is now landing on the right part of the node no matter where the field is.

Status: Fixed » Closed (fixed)

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

msonnabaum’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Needs work
StatusFileSize
new94.61 KB

I'd like to open this back up as it appears that f2e8ca3 was a pretty serious performance regression.

To test this I ran xhprof on a node view page for a content type that has 21 fields, 1 of which is a multigroup. Attached is a screenshot from the report that shows content_field before and after this commit.

To sum it up, I'm seeing a 142426% regression in CPU time and a 64.8% regression in memory use.

I don't yet understand the change well enough to offer a patch, but I thought I'd bring this to your attention first.

Offlein’s picture

+1 on this. Super important!