Account created on 31 January 2008, over 16 years ago
#

Recent comments

πŸ‡³πŸ‡ΏNew Zealand scott.whittaker

Patch based on #228 to fix the unlimited cardinality bug.

πŸ‡³πŸ‡ΏNew Zealand scott.whittaker

The patch in #228 works for me, except that in my case I have a field with unlimited cardinality and when I edit an existing piece of content which has n items, it only shows n-1 items.

In WidgetBase.php I needed to change the $max from $field_state['items_count'] - 1 to $field_state['items_count'] in order to fix this bug:

    // Determine the number of widgets to display.
    switch ($cardinality) {
      case FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED:
        //$max = $field_state['items_count'] - 1;
        $max = $field_state['items_count'];
        $is_multiple = TRUE;
        break;
Production build 0.69.0 2024