Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Once a field is placed in a multi-group, changing the basic information (at least changing from one text type to another) will break the multigroup functionality. Adding new items after there is a blank item will result in a strange blank item being placed first, and subsequent items replace existing items.
Did I mention multigroup is freaking amazing? Thanks!
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedAh, yes. I forgot to code something here. In fact, you should not be able to change the widget type if the field is in a multigroup if you choose a widget type that is not compatible with multigroups.
We can disable the widget type selector, which is easy, or we need to perform a more complex validation that ensures an incompatible widget type cannot be selected. And if we do this, we could also hide these from the widget type selector.
Comment #2
markus_petrux CreditAttribution: markus_petrux commentedOk, a fix has been committed to CVS.
http://drupal.org/cvs?commit=283014
The behavior in the Basic Field Settings form works as follows:
- If a widget cannot be moved out of a multigroup, the widget type selector is disabled and a warning is displayed.
- If a widget in the list of available widgets is not compatible with multigroups, the option is removed.
This is done applying the same checks that are already implemented in the validate handler of the "Manage fields" screen. You cannot move a field into a multigroup, if this field uses a widget type that is not compatible with multigroups. And... you cannot move a field out of a multigroup, in certain situations. The problem is that fields in multigroups may collect the same value several times, and this is not possible when the field is not part of a multigroup. Think about widgets types such as optionwidgets, content taxonomy widgets, etc.