Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist #338

Closed
ashvinimarwal opened this issue Jul 25, 2017 · 7 comments
Labels

Comments

@ashvinimarwal
Copy link

i have migrated magento data from 1.9.x to fresh magento 2.1.7 and now when i save new product it ive the following error
Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist
/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
Kindly see the screenshot.
28332101-1f778c4e-6c11-11e7-95c9-45bc656df73f

Please help

@victor-v-rad
Copy link
Collaborator

Strange enough. The latest data migration tool should have converted "catalog/product_attribute_backend_media" M1 class name to empty string. Find this M1 class name in class-map.xml.dist. Also you can remove Magento\Catalog\Model\Product\Attribute\Backend\Media manually in your migrated Magento 2 store in eav_attribute, catalog_eav_attribute, customer_eav_attribute, eav_entity_type tables

@ashvinimarwal
Copy link
Author

ashvinimarwal commented Jul 25, 2017

Thanks a lot @victor-v-rad , Now i can see products on category page with images but product page is giving 404 error.
And now I'm getting new error while saving any product in back-end.
See screenshot
image

System log screenshot (for product page 404 error)
image

@victor-v-rad
Copy link
Collaborator

Make sure you are using the latest version of the tool by checking out mage2_root/vendor/magento/data-migration-tool/composer.json file. There you should see "version": "2.1.7"

@ashvinimarwal
Copy link
Author

Hello @victor-v-rad ,

I follwed the following setup to do the migration from magento 1.9.x to magento 2.0.7
Steps
1.Created the backup of magento live site as /www/m1_live/
2.Installed the fresh copy of magento 2 on local as /www/m2_root/
3.Download the migration tool and extract that in magento 1 site as
/www/m1_live/magento2_data_migration-0.1.25
4.Open the the path on browser as 127.0.0.1/m1_live/magento2_data_migration-0.1.25
and submitted the both database details
5.Followed the Next on each step.

I did this right ?

I have inserted new row for same attribute id(Media Gallery) in catalog_eav_attritbues table and now facing following issue on front end of some categories.

1 exception(s):
Exception #0 (ReflectionException): Class NULL does not exist

Exception #0 (ReflectionException): Class NULL does not exist
#0 /home/coolkidz/public_html/beta/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('NULL')
#1 /home/coolkidz/public_html/beta/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('NULL')
#2 /home/coolkidz/public_html/beta/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('NULL')
#3 /home/coolkidz/public_html/beta/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('NULL', Array)
#4 /home/coolkidz/public_html/beta/vendor/magento/framework/Validator/UniversalFactory.php(36): Magento\Framework\ObjectManager\ObjectManager->create('NULL', Array)
#5 /home/coolkidz/public_html/beta/vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php(498): Magento\Framework\Validator\UniversalFactory->create('NULL')
#6 /home/coolkidz/public_html/beta/var/generation/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php(1103): Magento\Eav\Model\Entity\Attribute\AbstractAttribute->getBackend()
#7 /home/coolkidz/public_html/beta/vendor/magento/module-eav/Model/Entity/AbstractEntity.php(621): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->getBackend()
#8 /home/coolkidz/public_html/beta/var/generation/Magento/Catalog/Model/ResourceModel/Product/Interceptor.php(505): Magento\Eav\Model\Entity\AbstractEntity->walkAttributes('backend/afterLo...', Array, NULL)

@victor-v-rad
Copy link
Collaborator

Following the official Migration Guide would be best.

@ashvinimarwal
Copy link
Author

ashvinimarwal commented Jul 26, 2017

so i have to start it again ?
any way to fix current site ?

@ashvinimarwal
Copy link
Author

Thank you @victor-v-rad ,Issue is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants