ImportDefinitions PIMCORE: Problem Import fieldcollection from CSV FILE


#1

Hi,

I have create a DATA OBJECT FIELD-COLLECTIONS called POSTEC with 4 DATA COMPONENT :

1. Position ( Type: Many to One Relation)

2. AREA     ( Type: INPUT)

3. and others. ........

then i create a CLASS called Product with:

1. Layout and some data components

2. Layout ->Data Components (FIELD-COLLECTION) called **POSTECNOL** with SPECIFIC SETTING
   ALLOW TYPES: POSTEC ( OBJECT CREATED BEFORE)

i want import data from COLUMN CALLED “0501_ImprintSize_IL1_T1” of file CSV to “AREA” (TYPE INPUT) of object POSTEC.

I 'm using ImportDefinitions and this setting in TAB “MAPPING”

FROM TO: 0501_ImprintSize_IL1_T1 ( COLUMN FILE CSV)
TO: AREA (FIELD OF OBJECT FIELD-COLLECTIONS
INTERPRETER: EMPTY ( THERE ISN’T CHOICE " FIELDCOLLECTION" how show in README GUIDE )
SETTER: fieldcollection

SETTER SETTING

FIELD: POSTECNOL
KEYS (FROM: TO:) : AREA:0501_ImprintSize_IL1_T1

L’import show me in file this ERROR:

Error: Too few arguments to function Pimcore\Model\DataObject\AbstractObject::get(), 0 passed in /pimcore/cipi/vendor/w-vision/import-definitions/src/ImportDefinitionsBundle/Setter/FieldCollectionSetter.php on line 55 and at least 1 expected [] []

PHOTO PROBLEM:

Because ? i have follow guide carefully.

Where i wrong ?

Let me know and thanks in advance.

Best Regards
Antonello


#2

Did you overwrite something? Cause line 55 of the FieldCollectionSetter actually gets the current FieldCollection Data, but the function doesn’t have any arguments.

I have absolutely no idea whats going wrong…


#3

Hi, very thanks for your answer.

I have recreate new import, but now show me this error:

SELECT object_localized_42_it_IT.o_id as o_id, object_localized_42_it_IT.o_type FROM object_localized_42_it_IT WHERE (fieldcollection~POSTECNOL~POSTEC~AREA = ? AND object_localized_42_it_IT.o_type IN (‘variant’,‘object’,‘folder’))’ with params [“80 x 17”]: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘fieldcollection~POSTECNOL~POSTEC~AREA’ in 'where clause’

Can you help me ? i don’t understand this problem.

THANKS IN ADVANCE.

Best Regards
Antonello


#4

Hello,
I have the same problem wile import to fieldcollection

/FieldCollectionSetter.php(55): Pimcore\Model\DataObject\AbstractObject->get()

antocipi could you post sample csv data?


#5

I recommend you creating a custom interpreter to solve that…


#6

Hi Inarus,

thanks for your answer.

I have a flat csv data and i have to import data in a DATA OBJECT FIELD-COLLECTIONS con 4 component.

With XML file i have always problem for import in DATA OBJECT FIELD-COLLECTIONS

My File EXAMPLE XML

<?xml version="1.0" encoding="utf-8"?> 474574757 XX4444 0.560 10,5X18X50 CM 674585484584 yyyy444 0.90 15,5X15X20 CM

i want assign LENGTH to COMPONET AREA of DATA OBJECT FIELD-COLLECTIONS

but i have this error:

import_definition.total: 2 [] []
[2019-02-20 10:28:52] process_73.INFO: import_definition.status: Import Object new [] []
[2019-02-20 10:28:52] process_73.INFO: import_definition.status: Error: Too few arguments to function Pimcore\Model\DataObject\AbstractObject::get(), 0 passed in /pimcore/xxxx/vendor/w-vision/import-definitions/src/ImportDefinitionsBundle/Setter/FieldCollectionSetter.php on line 55 and at least 1 expected

Can you help me?

How can i import a XML DATA in a DATA OBJECT FIELD-COLLECTIONS ?

Let me know.

Very Thanks.