feed-me icon indicating copy to clipboard operation
feed-me copied to clipboard

Asset field with multiple entries in a matrix produces wrong values for element fields

Open tomfrit opened this issue 2 months ago • 1 comments

Description

Wehn trying to import an asset field with multiple entries which is nested in a matrix field the element fields for each asset are populated wrong. Only the first occurence of the field value is used for every entry

Steps to reproduce

  1. Create an entry type with a matrix field. In this matrix field place an asset/image field
  2. import a JSON file with a structure like this:
[
	{
		"matrix": [
			{
				"images": [
					{ "url": "https:\/\/localhost\/image_1.jpg", "description": "Description for image 1" },
					{ "url": "https:\/\/localhost\/image_2.jpg", "description": "Description for image 2" },
					{ "url": "https:\/\/localhost\/image_3.jpg", "description": "Description for image 3" },
					{ "url": "https:\/\/localhost\/image_4.jpg", "description": "Description for image 4" },
				]
			}
		]
	}
]
  1. Map the data in feedme so url is the asset source and description is the alt text (under "element fields")

Result: While the assets are properly created, they all get the alt text "Description for image 1"

Additional info

  • Craft version: 5.8.18
  • PHP version: 8.3.21
  • Database driver & version:
  • Plugins & versions: Feedme 6.10.1

tomfrit avatar Oct 17 '25 06:10 tomfrit

PT-2937

linear[bot] avatar Oct 17 '25 06:10 linear[bot]