Drupal Association members fund grants that make connections all over the world.
There are a couple of issues in the CCK queue that are related to multigroups:
Let me quote myself on a comment I posted in comment #93 of the first issue:
The only issue with this patch I know of is that possible conflict with filefield/imagefield, but I think both 'remove' buttons can co-exist perfectly well because they both serve a different purpose which seems to be clear enough for the user, as far as I can tell from the input I got here in the office, and having got no negative comment from here either. hmm... yes, look. The 'remove' button provided here allows the user to remove an item, it desapears from the UI. The 'remove' button provided by filefield/imagefield can be used to clear the value of the item, which is not the same exact thing. Anyway... I would love to hear suggestions here, so there may be a better way to do it.
That being said. fielfield/imagefield don't work with multigroups. Well, more or less. What fails is the AHAH stuff related to the 'remove' button provided by fielfield/imagefield. I started to look at that, and I feel it can be solved with a patch to filefield, but I'm not yet sure. Unfortunately, I've been very busy this week with other things, so I had to leave this temporarily. I hope to get back to it next week.
PS: I think the problem with filefield in multigroups is related to the value callback, which is a piece of code that's executed before after_build, which is where the multigroup code uses to move fields back to their original positions in the form. Well, I said, I'm not sure... the function that's aparently broken is filefield_js(), but the real cause may be somewhere else...
Please, let me know if there's anything else that needs to be done in regards to the 'remove' button, so that I can provide a different patch to CCK, or maybe work a patch here for filefield.
When looking at the compatibility issue with multigroups, I noticed that filefield 'compacts deltas' in several places. Is there any reason for that? This is a problem because that will cause delta items to shift within multigroups. For example, if we have the following:
delta myfile mytext myselect 0 foo.txt foofoo Option A 1 bar.txt barbar Option B 2 abc.txt abcabc Option C
If the second file (bar.txt) is emptied, we need to still keep the other fields in sync, so we get this:
delta myfile mytext myselect 0 foo.txt foofoo Option A 1 - barbar Option B 2 abc.txt abcabc Option C
That's why we cannot compact deltas anymore.
However, fielfield compacts deltas in several places, so get the following, which is not correct.
delta myfile mytext myselect 0 foo.txt foofoo Option A 1 abc.txt barbar Option B 2 - abcabc Option C
Note that the 3rd file has been moved to the second row (because its delta has been changed by compacting deltas code in filefield), related to other fields, which is wrong.
Well, I'm wondering why filefield is compacting deltas. ¿? ...what would happen if we remove that. Compacting deltas should be something that is resolved within CCK when needed, see content_set_empty(), so maybe it is not really needed here?