akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
952 stars 516 forks source link

Media attributes fails when updating product data #3788

Closed gplanchat closed 8 years ago

gplanchat commented 8 years ago

While importing updates to existing products, some errors occurs :

An error occurred during the import execution.
Error #0 in class Doctrine\DBAL\DBALException: An exception occurred while executing 'INSERT INTO akeneo_file_storage_file_info (file_key, original_filename, mime_type, size, extension, hash, storage) VALUES (?, ?, ?, ?, ?, ?, ?)' with params ["3\/6\/3\/a\/363a3dd4f3df867f72145b42b60636cdec15911a_62335_224843.jpg", "62335_224843.jpg", "image\/jpeg", 116250, "jpg", "776108a52e5a78671f188d417a6f1ea33590972b", "catalogStorage"]:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3/6/3/a/363a3dd4f3df867f72145b42b60636cdec15911a_62335_224843.jp' for key 'UNIQ_F19B3719A5D32530'

The image attributes does not seem to work correctly, the only datas that changed in this import should be some pim_catalog_price attributes. The error does not appear when the product did not exist yet.

Excepting a specific ArrayConverter that changes the columns names and maps the text values to attribute value codes, the import job is almost standard :

connector:
    name: Connector
    jobs:
        luni_import:
            title: luni_connector.jobs.api_import.title
            type:  import
            steps:
                product_import:
                    title:         luni_connector.jobs.api_import.steps.product_import.title
                    services:
                        reader:    pim_connector.reader.file.csv_product
                        processor: luni_connector.processor.denormalization.product.flat
                        writer:    pim_connector.writer.doctrine.product
                    parameters:
                        batch_size: 10
willy-ahva commented 8 years ago

Hi Grégory,

If I understood well steps your described can be enunciate as :

-> It results to your error.

I exactly tested this with the v1.4.18 ORM, I had no error and the price was correctly updated.

Please, migrate to the v1.4.18 and give us some feedback again :)

Best regards, Willy