BlackbitDigitalCommerce / pimcore-data-director

Import Bundle for Pimcore
16 stars 3 forks source link

Pimcore URL Slug Field #159

Closed amogjackie closed 5 months ago

amogjackie commented 5 months ago

Hi, if i import something into a Pimcore (11.2.3) URL Slug field it worked fine in version 3.5.43 -> it saved the data in the table object_url_slug from pimcore. Now in 3.6.16 it looks like import is trying to save it in the object_store_x table or wherever the col did not exist. Bildschirmfoto 2024-04-30 um 13 22 58

we did not change anything in the mapping

Bildschirmfoto 2024-04-30 um 13 23 34

BlackbitDevs commented 5 months ago

Hmm, I cannot reproduce this. Can you please send your dataport configuration JSON? And is your URL slug field directly in class or is it in object brick, localized field or anything special (best would be if you could also provide class definition).

And could you execute the dataport with -vvv - then we also see the call stack.

amogjackie commented 5 months ago

There is nothing special on it. The Slug-Field is in a Panel in a Fieldset

Bildschirmfoto 2024-05-02 um 09 55 29

dataport_18.json

We import it from a Rest-Api in Json-Format and Transform the Slug in a simple-way.

The trace is not really meaningful image

in dd 3.5.43 it worked fine.

BlackbitDevs commented 5 months ago

The error happens in your CheckMandatoryFieldsService, line 28. Can you please check what you have there?

Concerning mandatory field checks: Currently they do not get checked during import because otherwise it would not be possible to import objects whose mandatory fields shall get filled afterwards. But I plan to change this: If a mandatory field is checked, I want to check if it is filled. If not, the object will not get saved. If a mandatory field is not mapped in current import, it will not get checked. WDYT?

amogjackie commented 5 months ago

Oh yes thanks a lot, we rebuild this. It was only a little confusing that it worked under 3.5.43 (In this Service is a select on every mandatory field, but "Slug" is not part of the object-view-table in pimcore) But the changes are exactly what we need in future.

BlackbitDevs commented 5 months ago

With

But the changes are exactly what we need in future.

do you mean

But I plan to change this: If a mandatory field is checked, I want to check if it is filled. If not, the object will not get saved. If a mandatory field is not mapped in current import, it will not get checked.

?