magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Attribute image exceeded max length in row(s) when importing images from Amazon.com with CSV file

Open GoogleYY opened this issue 7 years ago • 3 comments

Preconditions

  1. Win 7 / CentOS Linux release 7.4.1708
  2. PHP Version 7.0.28 3.Magento ver. 2.2.4 4.Luma blank theme without sample data

Steps to reproduce

  1. Log into backend panel
  2. Go to System->Import
  3. Select products as Entity Type option, select Add/Update as Import Behavior, Select Stop on Error, Allowed Errors Count is 10,Field separator is Comma(,) ,Multiple value separator is Comma(,) , Fields enclosure filed is empty. 4.Select File to Import 5.Images File Directory left blank (As the images were going to fetch from Amazon.com) 6.Click Check Data

Expected result

  1. It should be 0 errors.

Actual result

error

  1. Attribute image exceeded max length in row(s): 1, 3, 4, 6

Further steps to reproduce I tried changing the data const DB_MAX_VARCHAR_LENGTH from 256 to 512 in MagentoRootFile\vendor\magento\module-import-export\Model\Import\AbstractEntity.php and then run the commands php bin/magento setup:upgrade and php bin/magento cache:flush respectively. The errors still exists

The text content of base_image column is: https://images-na.ssl-images-amazon.com/images/I/61btlFPdvBL.SL1000.jpg,https://images-na.ssl-images-amazon.com/images/I/51I%2Bhf88F7L.SL1000.jpg,https://images-na.ssl-images-amazon.com/images/I/51y0P8C5-2L.SL1000.jpg,https://images-na.ssl-images-amazon.com/images/I/51uwDQfaHrL.SL1000.jpg,https://images-na.ssl-images-amazon.com/images/I/61Wh7FkyNYL.SL1000.jpg

GoogleYY avatar Jun 02 '18 07:06 GoogleYY

I've solved this problem by myself. There are two AbstractEntity.php file in magento file. One is in vendor\magento\module-import-export\Model\Import folder the another one is in vendor\magento\module-import-export\Model\Import\Entity\AbstractEntity.php. After I changed the number of DB_MAX_VARCHAR_LENGTH up to 1024 in vendor\magento\module-import-export\Model\Import\Entity\AbstractEntity.php the problem no more occurred.

I know it is not a good behavior to touch the core code. I am very appreciated if some one has better solution to solve this problem.

GoogleYY avatar Jun 03 '18 12:06 GoogleYY

@GoogleYY, thank you for your report. We've acknowledged the issue and added to our backlog.

ghost avatar Aug 15 '18 14:08 ghost

Hi @engcom-Delta. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

m2-assistant[bot] avatar May 21 '24 06:05 m2-assistant[bot]

Hi @GoogleYY ,

Verified the issue on 2.4-develop and it is reproducible.

Hence confirming this issue

Steps to reproduce:-

1.Log into backend panel 2.Go to System->Import 3.Select products as Entity Type option, select Add/Update as Import behavior, Select Stop on Error, Allowed Errors Count is 10,Field separator is Comma(,) ,Multiple value separator is Comma(,) , Fields enclosure filed is empty. 4.Select File to Import 5.Images File Directory left blank (As the images were going to fetch from Amazon.com) 6.Click Check Data

Selected all the options

Screenshot 2024-05-29 at 6 16 15 PM

Uploaded file

Screenshot 2024-05-29 at 6 15 08 PM

Click Check Data

Screenshot 2024-05-29 at 6 15 20 PM

Even if the validation passed but it is giving attribute image exceeded max length in row error.

engcom-Delta avatar May 29 '24 12:05 engcom-Delta

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12036 is successfully created for this GitHub issue.

github-jira-sync-bot avatar May 29 '24 13:05 github-jira-sync-bot

:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

m2-assistant[bot] avatar May 29 '24 13:05 m2-assistant[bot]