2

After I migrated from Magento 1.9.3.8 to 2.2.5 although I can create new customers I can't edit and save the migrated ones. In admin, I get errors that First Name, Last Name, and other attributes are needed. But in customers, these fields are filled. In

system.log

I get:

[2019-02-16 12:55:39] report.WARNING: Attempt to load value of nonexistent EAV attribute '1163'
                        for entity type 'Magento\Catalog\Api\Data\ProductInterface'. [] []
[2019-02-16 12:55:39] report.WARNING: Attempt to load value of nonexistent EAV attribute '1206'
                        for entity type 'Magento\Catalog\Api\Data\ProductInterface'. [] []

and

[2019-02-16 12:57:27] report.INFO: Broken reference: the 'notification.messages' tries to reorder itself towards 'user', but their parents are different: 'header.inner.right' and 'header' respectively [] []

I managed to remove the mentioned attributes which were product attributes. As continue investigation my problem is a Magento 2.2.5 bug or because Magento 1.9.3.8 was using Amasty customer attributes extension, these customer attributes were migrated to Magento 2 and created this problem.

When I save a migrated customer in admin I get:

"First Name" is a required value.

"First Name" length must be equal to or greater than 1 character.

"Last Name" is a required value.

"Last Name" length must be equal to or greater than 1 character.

"Street Address" is a required value.

"Street Address" length must be equal to or greater than 1 character.

But all these fields are correctly filled.

Can anyone help me what to check, please? I am going crazy here...

4
  • It looks like few of product attributes are not migrated properly. You should check product attribute listing. Feb 16, 2019 at 13:25
  • @RamkishanSuthar probably you mean customer attributes. In Magento one I was using Amasty customer attributes....So I think these are the problem. How can I remove them from database?
    – G. G.
    Feb 16, 2019 at 13:52
  • You have to identify those attribute and removed them using UpgradeData.php Feb 16, 2019 at 14:09
  • @RamkishanSuthar I found the attribute in eav attribute table. How can I remove them from database directly?
    – G. G.
    Feb 17, 2019 at 11:01

2 Answers 2

0

I figured out what happened and fixed. Some of the migrated customers had more than one address. In there the

First Name

Last Name

Street Address

was empty.

When I edited the customers and delete that address without fill up these fields I got the error I posted.

I don't if it should work that way but now I fixed it and all customers saved fine.

0

This happening because of validation file in vendor\magento\framework\File\Uploader and in this function

 private function _setUploadFileId($fileId)
    {
        if (is_array($fileId)) {
            $this->validateFileId($fileId);
            $this->_uploadType = self::MULTIPLE_STYLE;
            $this->_file = $fileId;
        }

comment this following line in the above function:

// $this->validateFileId($fileId);

We can need to override the above function using the following steps: We can override using preference.

  1. Create di.xml

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="vendor\magento\framework\File\Uploader" type="NameSpace\Customer\Framework\File\Uploader" />
    
  2. Create class php file In the given path put your fle NameSpace\Customer\Framework\File\Uploader

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.