BlackbitDigitalCommerce / pimcore-data-director

Import Bundle for Pimcore
16 stars 3 forks source link

ERROR: Could not load preview panel grid's columns #21

Closed betterapp closed 2 years ago

betterapp commented 2 years ago

Hi.

We want to setup export data for PimCore object - class Product. Our definition is very complex - have many different relations to other objects and bricks.

When we click Auto Create button under Row Data Field section it generate almost 1000 rows. Now when we want to Save dataport we got error:

image

And the Attribute mapping panel is empty: image

The problem is here: image

I tried to debug a little why the error occurred: image

and saw something like this: image

What can we do about it ? Is it a bug or DD can not handle so much complex class definition ?

BlackbitDevs commented 2 years ago

Can you export the dataport configuration and upload it somewhere where I can access it? Or at least the class definition so that I can try to reproduce the problem?

betterapp commented 2 years ago

Yes I can but I can not share it publicly. Can You give me your email address @BlackbitNeueMedien ??

BlackbitDevs commented 2 years ago

Please send it to hilfe@blackbit.de or info@blackbit.de together with a link to this issue.

betterapp commented 2 years ago

OK. Email sent to hilfe@blackbit.de

betterapp commented 2 years ago

@BlackbitNeueMedien I got email with information that this issue can be fixed but we need to pay for it. Is it true or You will try to reproduce the problem ?

betterapp commented 2 years ago

@BlackbitNeueMedien

The problem exist also on small class with only few fields. I have a class SmallProduct with 3 filelds only. And have the same behavior. Attribute Mapping is empty.

Class definition: image

DD export definition Settings: image

Attribute mapping: image

When I click here: image

I got error message: image

Here is the class definition and DD dataport definition (changed .json to .txt extension):

class_SmallProduct_export.txt bb-export-small-product.txt

betterapp commented 2 years ago

I found out that when I create new class definition from ground - everything is ok. When I create new class and import this definition to it - it is not working.

Is DD cache some data ?

betterapp commented 2 years ago

Hmm. But now it does not work even for new class. There is a big bug :)

betterapp commented 2 years ago

@BlackbitNeueMedien

https://www.youtube.com/watch?v=0vTrCR2qjYk

betterapp commented 2 years ago

The problem is that plugin_pim_fieldmapping table have no data for dataport.

I checked that the data are created with: \Blackbit\DataDirectorBundle\model\Fieldmapping::create method.

It is called from two locations:

\Blackbit\DataDirectorBundle\Controller\ImportconfigController::importDataport
\Blackbit\DataDirectorBundle\Controller\MappingconfigController::saveConfigAction

The second should run for @Route("/save-config") but it is never used ??

@BlackbitNeueMedien when it will be fixed. We can not use Your bundle for exporting data.

BlackbitDevs commented 2 years ago

@BlackbitNeueMedien

https://www.youtube.com/watch?v=0vTrCR2qjYk

Hi @betterapp , this is not how exports work. You created the raw data fields but did not tell the data director what to do with this raw data. Please select a template in the Result callback function, e.g. "Export raw data as JSON". This function will contain virtual fields like {{ firstName }}. Those will automatically appear in attribute mapping then and get mapped to the raw data fields with the same name. Of course you can remap them to another field or add a callback function - the same as you can do for imports. Please have a look at the tutorial video about exports - here it is explained how to define the export format. At the time of recording there were no virtual fields yet so all raw data fields got exported but essentially it works the same. Perhaps you even see it better in the grid export tutorial video - there virtual fields do get used.

betterapp commented 2 years ago

@BlackbitNeueMedien You are right. Sorry.