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

Asset Element field data is duplicated - not mapping correctly

Open richardfrankza opened this issue 7 years ago • 7 comments

Description

I'm importing images and mapping to the element fields of the asset (e.g. "alt text").

I have the following structure

[
    {
        "url-title": "test",
        "title": "test",
        "cf_general_images": [
            {
                "mx_image": "http:\/\/www.flowsa.com\/fl.jpg",
                "mx_alt": "foo"
            },
            {
              "mx_image": "http:\/\/www.flowsa.com\/fl2-large.png",
              "mx_alt": "bar"
            }
          ]
    }
]

After the import, both images have "foo" as alt text.

The debug output is as follows

Array
(
    [file] => Array
        (
            [17354] => Array
                (
                    [altText] => foo
                )

        )

)

Array
(
    [file] => Array
        (
            [17355] => Array
                (
                    [altText] => foo
                )

        )

)


Array
(
    [title] => test
    [slug] => test
    [images] => Array
        (
            [new1] => Array
                (
                    [type] => gallery
                    [order] => 0
                    [enabled] => 1
                    [collapsed] => 
                    [fields] => Array
                        (
                            [file] => Array
                                (
                                    [0] => 17354
                                )

                        )

                )

            [new2] => Array
                (
                    [type] => gallery
                    [order] => 1
                    [enabled] => 1
                    [collapsed] => 
                    [fields] => Array
                        (
                            [file] => Array
                                (
                                    [0] => 17355
                                )

                        )

                )

        )

)

Additional info

  • Plugin version: 3.0.0-21
  • Craft version: 3.0.22

richardfrankza avatar Oct 19 '18 07:10 richardfrankza

This should be fixed in 3.0.0-beta.23.

engram-design avatar Oct 23 '18 06:10 engram-design

I still have a problem unfortunately.

The same example now only returns one result


Array
(
    [file] => Array
        (
            [17354] => Array
                (
                    [altText] => foo
                )

        )

)
Array
(
    [title] => test
    [slug] => test
    [images] => Array
        (
            [new1] => Array
                (
                    [type] => gallery
                    [order] => 0
                    [enabled] => 1
                    [collapsed] => 
                    [fields] => Array
                        (
                            [file] => Array
                                (
                                    [0] => 17354
                                )

                        )

                )

        )

)

richardfrankza avatar Oct 30 '18 03:10 richardfrankza

Experiencing same issue in Craft 3.2.10 and FeedMe 4.1.2. When there is a number of Assets created from within an Entry import, the Inner Element Fields of the Asset that is created is overwritten with the values of the first sibling, and ignore the relative values of each node. Can someone please have a look at this issue? It's ongoing and has been open since last year.

thinkflo avatar Aug 20 '19 12:08 thinkflo

Just running into same here. Only realizing after adding 140,000 entries!

john-henry avatar Nov 23 '19 07:11 john-henry

@thinkflo @john-henry - I'm not able to replicate this. Could you send a email to [email protected] quoting this issue with a sample of your feed?

olivierbon avatar Nov 25 '19 00:11 olivierbon

@olivierbon I sent that onto this morning. Thanks for looking

john-henry avatar Nov 25 '19 15:11 john-henry

Hitting this myself today, also after importing hundreds of entries. For context, my setup is multiple assets being imported into a single field inside of a Matrix block. Each image has a distinct caption and alt text, verified by reviewing the JSON I'm importing, but the first image's field values are being applied to all subsequent images.

amphibian avatar Apr 14 '22 21:04 amphibian

@amphibian I can’t seem to reproduce the bug on a single and matrix field for version 4.4.2. If the issue persists, please send a report to [email protected]. We may ask for your database and project files to debug the problem further.

pdaleramirez avatar Mar 28 '23 14:03 pdaleramirez