Attribute image exceeded max length in row(s) when importing images from Amazon.com with CSV file
Preconditions
- Win 7 / CentOS Linux release 7.4.1708
- PHP Version 7.0.28 3.Magento ver. 2.2.4 4.Luma blank theme without sample data
Steps to reproduce
- Log into backend panel
- Go to System->Import
- 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
- It should be 0 errors.
Actual result

- 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
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, thank you for your report. We've acknowledged the issue and added to our backlog.
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:
-
- Add/Edit
Area: XXXXXlabel to the ticket, indicating the functional areas it may be related to.
- Add/Edit
-
- Verify that the issue is reproducible on
2.4-developbranchDetails
- Add the comment@magento give me 2.4-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced 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!
- Verify that the issue is reproducible on
-
- If the issue is not relevant or is not reproducible any more, feel free to close it.
- Join Magento Community Engineering Slack and ask your questions in #github channel.
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
Uploaded file
Click Check Data
Even if the validation passed but it is giving attribute image exceeded max length in row error.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12036 is successfully created for this GitHub issue.
: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.