feeds_item this field cannot hold more than 1 values.

Created on 12 February 2024, 4 months ago
Updated 26 February 2024, 4 months ago

Feeds item (feeds_item): Feeds item: this field cannot hold more than 1 values.

I'm constantly running into this issue with feeds, we have multiple feeds importing into the same content type. Is this expected behaviour or are we using the wrong strategy to import?

The reason we split them out was to make it less likely that content was wiped by mistake and that specific fields that are multiple value reference fields could be handled seperatley.

Cheers Dan

πŸ’¬ Support request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom danharper

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @danharper
  • Status changed to Fixed 4 months ago
  • πŸ‡³πŸ‡±Netherlands MegaChriz

    Using multiple feeds to update the same content is a supported feature. The feeds_item field used to be a single value field, but it was changed to a multivalue field a few releases ago. Existing feeds_item fields were updated by running feeds_post_update_ensure_feeds_item_storage_config_cardinality_is_unlimited(). This function should have run automatically when running database updates (drush updatedb or update.php). Perhaps you accidentally reverted the config of some feeds_item fields after that update ran?

    You should be able to fix this issue by manually editing the field.storage.node.feeds_item.yml config file and set "cardinality" to -1. Or if you importing entities of an other type, change it into the field.storage.[entity type].feeds_item.yml config file. After changing the config file, do a config import.

    Example of field.storage.node.feeds_item.yml on my custom project:

    uuid: 1d2038b7-1b62-4ab6-ad4b-c0b6f1734b61
    langcode: nl
    status: true
    dependencies:
      module:
        - feeds
        - node
    id: node.feeds_item
    field_name: feeds_item
    entity_type: node
    type: feeds_item
    settings:
      target_type: feeds_feed
    module: feeds
    locked: false
    cardinality: -1
    translatable: false
    indexes: {  }
    persist_with_no_fields: false
    custom_storage: false
    
  • πŸ‡¬πŸ‡§United Kingdom danharper

    Great thanks for the info, I must have overwritten the config somehow.

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

Production build 0.69.0 2024