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

SwatchAttributeType does not exist #1059

Closed
refueledinc opened this issue Sep 4, 2018 · 4 comments
Closed

SwatchAttributeType does not exist #1059

refueledinc opened this issue Sep 4, 2018 · 4 comments
Labels

Comments

@refueledinc
Copy link

Preconditions

Magento Version : 2.2.3 CE

ElasticSuite Version : 2.6.0

Environment : Developer

Third party modules : Anowave google tag manager

Steps to reproduce

  1. We had ES 2.5.14 installed and updated to ES 2.6.0 via composer.

Expected result

  1. Successful update

Actual result

  1. When viewing a category page we get the following error:
2 exception(s):
Exception #0 (ReflectionException): Class Magento\Swatches\Model\SwatchAttributeType does not exist
Exception #1 (ReflectionException): Class Magento\Swatches\Model\SwatchAttributeType does not exist

Exception #0 (ReflectionException): Class Magento\Swatches\Model\SwatchAttributeType does not exist
#0 /vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Smile\\Elasticsu...')
#1 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Smile\\Elasticsu...')
#2 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Smile\\Elasticsu...')
#3 /vendor/magento/framework/Interception/PluginList/PluginList.php(250): Magento\Framework\ObjectManager\ObjectManager->get('Smile\\Elasticsu...')
#4 /vendor/magento/framework/Interception/Interceptor.php(119): Magento\Framework\Interception\PluginList\PluginList->getPlugin('Smile\\Elasticsu...', 'swatches_facet_...')
#5 /vendor/magento/framework/Interception/Interceptor.php(153): Smile\ElasticsuiteCatalog\Model\Layer\Filter\Attribute\Interceptor->Magento\Framework\Interception\{closure}()
#6 /generated/code/Smile/ElasticsuiteCatalog/Model/Layer/Filter/Attribute/Interceptor.php(39): Smile\ElasticsuiteCatalog\Model\Layer\Filter\Attribute\Interceptor->___callPlugins('addFacetToColle...', Array, Array)
#7 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Block/Navigation.php(187): Smile\ElasticsuiteCatalog\Model\Layer\Filter\Attribute\Interceptor->addFacetToCollection()
#8 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Block/Navigation.php(174): Smile\ElasticsuiteCatalog\Block\Navigation->addFacets()
#9 /vendor/magento/framework/View/Element/AbstractBlock.php(272): Smile\ElasticsuiteCatalog\Block\Navigation->_prepareLayout()
#10 /vendor/magento/framework/View/Layout/Generator/Block.php(150): Magento\Framework\View\Element\AbstractBlock->setLayout(Object(Magento\Framework\View\Layout\Interceptor))
#11 /vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\Framework\View\Layout\Generator\Block->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#12 /vendor/magento/framework/View/Layout.php(344): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#13 /generated/code/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#14 /vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#15 /vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#16 /vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#17 /vendor/magento/framework/View/Page/Config.php(197): Magento\Framework\View\Layout\Builder->build()
#18 /vendor/magento/framework/View/Page/Config.php(509): Magento\Framework\View\Page\Config->build()
#19 /vendor/magento/framework/View/Page/Config.php(467): Magento\Framework\View\Page\Config->getElementAttribute('body', 'class')
#20 /vendor/magento/module-catalog/Controller/Category/View.php(200): Magento\Framework\View\Page\Config->addBodyClass('page-products')
#21 /generated/code/Magento/Catalog/Controller/Category/View/Interceptor.php(24): Magento\Catalog\Controller\Category\View->execute()
#22 /vendor/magento/framework/App/Action/Action.php(107): Magento\Catalog\Controller\Category\View\Interceptor->execute()
#23 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#24 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Category\View\Interceptor->___callParent('dispatch', Array)
#25 /app/code/Anowave/Ec/Plugin/App/Action/Context.php(148): Magento\Catalog\Controller\Category\View\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#26 /vendor/magento/framework/Interception/Interceptor.php(135): Anowave\Ec\Plugin\App\Action\Context->aroundDispatch(Object(Magento\Catalog\Controller\Category\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#27 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Category\View\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#28 /generated/code/Magento/Catalog/Controller/Category/View/Interceptor.php(39): Magento\Catalog\Controller\Category\View\Interceptor->___callPlugins('dispatch', Array, Array)
#29 /vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Category\View\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#30 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#31 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#32 /vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#33 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#34 /vendor/amasty/aminvisiblecaptcha/Plugin/Predispatch.php(93): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#35 /vendor/magento/framework/Interception/Interceptor.php(135): Amasty\InvisibleCaptcha\Plugin\Predispatch->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#36 /vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#37 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#38 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#39 /generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#40 /vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#41 /generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#42 /vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#43 /pub/index.php(38): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#44 {main}

Exception #1 (ReflectionException): Class Magento\Swatches\Model\SwatchAttributeType does not exist
#0 /vendor/magento/framework/Code/Reader/ClassReader.php(29): ReflectionParameter->getClass()
#1 /vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Smile\\Elasticsu...')
#2 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Smile\\Elasticsu...')
#3 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Smile\\Elasticsu...')
#4 /vendor/magento/framework/Interception/PluginList/PluginList.php(250): Magento\Framework\ObjectManager\ObjectManager->get('Smile\\Elasticsu...')
#5 /vendor/magento/framework/Interception/Interceptor.php(119): Magento\Framework\Interception\PluginList\PluginList->getPlugin('Smile\\Elasticsu...', 'swatches_facet_...')
#6 /vendor/magento/framework/Interception/Interceptor.php(153): Smile\ElasticsuiteCatalog\Model\Layer\Filter\Attribute\Interceptor->Magento\Framework\Interception\{closure}()
#7 /generated/code/Smile/ElasticsuiteCatalog/Model/Layer/Filter/Attribute/Interceptor.php(39): Smile\ElasticsuiteCatalog\Model\Layer\Filter\Attribute\Interceptor->___callPlugins('addFacetToColle...', Array, Array)
#8 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Block/Navigation.php(187): Smile\ElasticsuiteCatalog\Model\Layer\Filter\Attribute\Interceptor->addFacetToCollection()
#9 /vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Block/Navigation.php(174): Smile\ElasticsuiteCatalog\Block\Navigation->addFacets()
#10 /vendor/magento/framework/View/Element/AbstractBlock.php(272): Smile\ElasticsuiteCatalog\Block\Navigation->_prepareLayout()
#11 /vendor/magento/framework/View/Layout/Generator/Block.php(150): Magento\Framework\View\Element\AbstractBlock->setLayout(Object(Magento\Framework\View\Layout\Interceptor))
#12 /vendor/magento/framework/View/Layout/GeneratorPool.php(80): Magento\Framework\View\Layout\Generator\Block->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#13 /vendor/magento/framework/View/Layout.php(344): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#14 /generated/code/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#15 /vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#16 /vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#17 /vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#18 /vendor/magento/framework/View/Page/Config.php(197): Magento\Framework\View\Layout\Builder->build()
#19 /vendor/magento/framework/View/Page/Config.php(509): Magento\Framework\View\Page\Config->build()
#20 /vendor/magento/framework/View/Page/Config.php(467): Magento\Framework\View\Page\Config->getElementAttribute('body', 'class')
#21 /vendor/magento/module-catalog/Controller/Category/View.php(200): Magento\Framework\View\Page\Config->addBodyClass('page-products')
#22 /generated/code/Magento/Catalog/Controller/Category/View/Interceptor.php(24): Magento\Catalog\Controller\Category\View->execute()
#23 /vendor/magento/framework/App/Action/Action.php(107): Magento\Catalog\Controller\Category\View\Interceptor->execute()
#24 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#25 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Controller\Category\View\Interceptor->___callParent('dispatch', Array)
#26 /app/code/Anowave/Ec/Plugin/App/Action/Context.php(148): Magento\Catalog\Controller\Category\View\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /vendor/magento/framework/Interception/Interceptor.php(135): Anowave\Ec\Plugin\App\Action\Context->aroundDispatch(Object(Magento\Catalog\Controller\Category\View\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#28 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Category\View\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#29 /generated/code/Magento/Catalog/Controller/Category/View/Interceptor.php(39): Magento\Catalog\Controller\Category\View\Interceptor->___callPlugins('dispatch', Array, Array)
#30 /vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Category\View\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#31 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#32 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#33 /vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#34 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#35 /vendor/amasty/aminvisiblecaptcha/Plugin/Predispatch.php(93): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#36 /vendor/magento/framework/Interception/Interceptor.php(135): Amasty\InvisibleCaptcha\Plugin\Predispatch->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 /vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#38 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#39 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#40 /generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#41 /vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#42 /generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#43 /vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#44 /pub/index.php(38): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#45 {main}
  1. Followed the uninstall guide to completely remove the extension, then installed ES 2.6.0 fresh. Same error.
@romainruaud
Copy link
Collaborator

Hello,

probably Magento\Swatches\Model\SwatchAttributeType does not exist in Magento 2.2.3.

I'll dig more to check how we could handle this more nicely to prevent failure if this class does not exists.

@Alizeinalzadeh
Copy link

Magento 2.2.2 CE has the same error with elasticsuite 2.6.0.

@refueledinc
Copy link
Author

It looks like Magento\Swatches\Model\SwatchAttributeType was added in Magento 2.2.4, but it looks like a PR is available to fix this issue.

@afoucret
Copy link
Contributor

afoucret commented Sep 5, 2018

PR have been merged and will be part of the next bugfix release (2.6.1).

That being said, I would encourage everyone to migrate to the last Magento 2.2.x version instead of staying with an outdated version. At least in order to apply latest security patches.

@afoucret afoucret closed this as completed Sep 5, 2018
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

4 participants