7

I've disabled and removed a module, but am still receiving errors. I've ran all the usual commands and removed all the usual files, but the issue persists. Any ideas? Example exception below:

Exception #0 (ReflectionException): Class MageWorx\SeoBase\Model\Source\MetaRobots does not exist
#0 /srv/public_html/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('MageWorx\\SeoBas...')
#1 /srv/public_html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(49): Magento\Framework\Code\Reader\ClassReader->getConstructor('MageWorx\\SeoBas...')
#2 /srv/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('MageWorx\\SeoBas...')
#3 /srv/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('MageWorx\\SeoBas...', Array)
#4 /srv/public_html/vendor/magento/framework/Validator/UniversalFactory.php(36): Magento\Framework\ObjectManager\ObjectManager->create('MageWorx\\SeoBas...', Array)
#5 /srv/public_html/vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php(613): Magento\Framework\Validator\UniversalFactory->create('MageWorx\\SeoBas...')
#6 /srv/public_html/generated/code/Dmatthew/AttributeDescription/Model/Entity/Attribute/Interceptor.php(1220): Magento\Eav\Model\Entity\Attribute\AbstractAttribute->getSource()
#7 /srv/public_html/vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(652): Dmatthew\AttributeDescription\Model\Entity\Attribute\Interceptor->getSource()
#8 /srv/public_html/vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(396): Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav->setupAttributeMeta(Object(Dmatthew\AttributeDescription\Model\Entity\Attribute\Interceptor), 'search-engine-o...', 6)
#9 /srv/public_html/vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(369): Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav->getContainerChildren(Object(Dmatthew\AttributeDescription\Model\Entity\Attribute\Interceptor), 'search-engine-o...', 6)
#10 /srv/public_html/vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(344): Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav->addContainerChildren(Array, Object(Dmatthew\AttributeDescription\Model\Entity\Attribute\Interceptor), 'search-engine-o...', 6)
#11 /srv/public_html/vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(304): Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav->getAttributesMeta(Array, 'search-engine-o...')
#12 /srv/public_html/vendor/magento/module-catalog/Ui/DataProvider/Product/Form/ProductDataProvider.php(73): Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav->modifyMeta(Array)
#13 /srv/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(316): Magento\Catalog\Ui\DataProvider\Product\Form\ProductDataProvider->getMeta()
#14 /srv/public_html/vendor/magento/framework/View/Element/UiComponentFactory.php(218): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('product_form', Array, false)
#15 /srv/public_html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(140): Magento\Framework\View\Element\UiComponentFactory->create('product_form', NULL, Array)
#16 /srv/public_html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(102): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'product_form', Array, Object(Magento\Framework\View\Layout\Interceptor))
#17 /srv/public_html/vendor/magento/framework/View/Layout/GeneratorPool.php(81): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#18 /srv/public_html/vendor/magento/framework/View/Layout.php(343): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#19 /srv/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#20 /srv/public_html/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#21 /srv/public_html/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#22 /srv/public_html/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#23 /srv/public_html/vendor/magento/framework/View/Layout.php(253): Magento\Framework\View\Layout\Builder->build()
#24 /srv/public_html/vendor/magento/framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
#25 /srv/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('menu')
#26 /srv/public_html/vendor/magento/module-backend/Model/View/Result/Page.php(26): Magento\Framework\View\Layout\Interceptor->getBlock('menu')
#27 /srv/public_html/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(24): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Catalog...')
#28 /srv/public_html/vendor/magento/module-catalog/Controller/Adminhtml/Product/Edit.php(71): Magento\Backend\Model\View\Result\Page\Interceptor->setActiveMenu('Magento_Catalog...')
#29 /srv/public_html/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\Edit->execute()
#30 /srv/public_html/vendor/magento/framework/App/Action/Action.php(108): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->execute()
#31 /srv/public_html/vendor/magento/module-backend/App/AbstractAction.php(231): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#33 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callParent('dispatch', Array)
#34 /srv/public_html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#35 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#36 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#37 /srv/public_html/generated/code/Magento/Catalog/Controller/Adminhtml/Product/Edit/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->___callPlugins('dispatch', Array, NULL)
#38 /srv/public_html/vendor/magento/framework/App/FrontController.php(159): Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#39 /srv/public_html/vendor/magento/framework/App/FrontController.php(99): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magento\Catalog\Controller\Adminhtml\Product\Edit\Interceptor))
#40 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#41 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#42 /srv/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#43 /srv/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#44 /srv/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#45 /srv/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#46 /srv/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#47 /srv/public_html/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#48 {main}

6 Answers 6

18

You have to delete the attribute which is created from the remove extension(3rd party extension).

Magento saves the attribute basic related at database table eav_attribute.

So you have to run the below query for identifying that attribute

SELECT * FROM eav_attribute WHERE source_model = 'MageWorx\SeoBase\Model\Source\MetaRobots'

You have to delete this attribute from the database.

After that flush cache.

4
  • 3
    Query didn't work for some reason, but this answer pointed me in the right direction. Thanks!
    – brackfost
    Commented Mar 19, 2019 at 17:41
  • It works after deleting the record from Database, where cleaning and flushing cache seemed required Commented Sep 24, 2019 at 7:47
  • 2
    just experienced similar issue with different extension, for query, use something like SELECT * FROM eav_attribute WHERE source_model LIKE 'VendorName\ExtensionName%' Commented Oct 17, 2019 at 19:20
  • Thank you thank you thank you. @Amit, this helped and it worked. Thanks a lot. My issue was with the Square Up module. SELECT * FROM eav_attribute WHERE source_model LIKE "%square%" Commented Oct 31, 2023 at 23:54
3

By the way I had also this problem but I found my issue in backend_model of eav_attribute table, not source attribute

2
  • 1
    This is good to note -- I've since encountered this as well.
    – brackfost
    Commented Jan 31, 2020 at 13:39
  • Also, frontend_model and attribute_model.
    – bfontaine
    Commented Aug 11, 2023 at 9:01
0

As a complement of the selected answer (Which is correct). In my case, the query SELECT * FROM eav_attribute WHERE source_model like 'Vendor\Module%' returned 0 rows.

Some caches like Full Page Cache / Varnish also generates these kind of issues. If this is your case and your are still getting this error after purging them, try the following:

  1. Run php bin/magento cache:status
  2. If you get full_page: 1 listed in the results then...
  3. Run php bin/magento cache:disable full_page
  4. Run php bin/magento cache:clean && php bin/magento cache:flush
  5. Try again (For me, error came up on product adding to cart)

If the error is gone, that means you are not purging the FPC the right way :)

Turn it on again and figure out what are you doing wrong.

0

The following query is showing 0 results.

SELECT attribute_id, attribute_code, backend_model, source_model FROM eav_attribute WHERE source_model != '' OR backend_model !=''

Any idea what might be the other reason for this issue?

0

i'm a totally novice in coding to manage Magento by code/command but i experiencing the exact issue

i have been trying to run that command

SELECT * FROM eav_attribute WHERE source_model = 'Amasty\SeoToolkitLite\Model\Source\Eav\Robots'

but it show only

SELECT: command not found

so i have no idea where to go next

1
  • We're talking SQL, not Magento CLI -- is that the issue?
    – brackfost
    Commented Dec 7, 2022 at 15:02
0

As there are people who are not getting any response to the SQL query (or 0 tables in response). I was facing the same situation. I want to share about what solved my issue. Go to Stores. Attribute Set. Delete the attributes and attribute sets, which are related to that module. Flush and Clean the cache. Hope it resolves the issue.

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.