CSV-Import error Required mapping key "item" is missing or contains no array

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
maco01
Posts: 21
Joined: 16 Mar 2022, 10:37

CSV-Import error Required mapping key "item" is missing or contains no array

Post by maco01 » 16 Mar 2022, 10:47

Hello,

I set up a cronjob in Typo3 for the csv import. If I don't specify an individual mapping, the import works without any problems. However, if I use my own mapping, this error always appears:

Execution of task "Aimeos Shop scheduler (aimeos)" failed with the following message: Required mapping key "item" is missing or contains no array.

I use the standard mapping from the documentation in the typoscript configuration field of the scheduler:

Code: Select all

controller.common.product.import.csv.mapping = Array (
    [item] => Array
        (
            [0] => product.code
            [1] => product.label
            [2] => product.type
            [3] => product.status
        )

    [text] => Array
        (
            [4] => text.type
            [5] => text.content
            [6] => text.type
            [7] => text.content
        )

    [media] => Array
        (
            [8] => media.url
        )

    [price] => Array
        (
            [9] => price.currencyid
            [10] => price.quantity
            [11] => price.value
            [12] => price.taxrate
        )

    [attribute] => Array
        (
            [13] => attribute.code
            [14] => attribute.type
        )

    [product] => Array
        (
            [15] => product.code
            [16] => product.lists.type
        )

    [property] => Array
        (
            [17] => product.property.value
            [18] => product.property.type
        )

    [catalog] => Array
        (
            [19] => catalog.code
            [20] => catalog.lists.type
        )
)
Does anyone have any advice as to what the error is?

Thanks & regards!

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: CSV-Import error Required mapping key "item" is missing or contains no array

Post by aimeos » 18 Mar 2022, 07:56

This is not valid TypoScript:

Code: Select all

controller.common.product.import.csv.mapping = Array (
Don't mix PHP examples from the docs with TypoScript configuration from TYPO3. A valid mapping in TypoScript would be:

Code: Select all

controller.common.product.import.csv.mapping {
    item {
        0 = product.code
        1 = product.label
        2 = product.type
        3 = product.status
    }
    # more mappings
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

maco01
Posts: 21
Joined: 16 Mar 2022, 10:37

Re: CSV-Import error Required mapping key "item" is missing or contains no array

Post by maco01 » 04 Apr 2022, 11:11

Thank you for your answear - it works now.

Post Reply