YotpoLtd / magento2-module-yotpo-reviews

Open Software License 3.0
23 stars 38 forks source link

Yotpo/Yotpo/Helper/ApiClient does not exist #182

Closed will-wright1 closed 5 years ago

will-wright1 commented 5 years ago

Latest version of the module with Amasty Sorting Module, on one site it stops the whole category page loading. On another site it intermittently stops users adding to cart.

EDIT: Actually breaks the category on both sites when logged in.

{"0":"Class Yotpo\Yotpo\Helper\ApiClient does not exist","1":"

#1 Magento\Framework\Code\Reader\ClassReader->getConstructor() called at [vendor\/magento\/framework\/ObjectManager\/Definition\/Runtime.php:49]\n#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:100]\n#3 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#4 Magento\Framework\ObjectManager\ObjectManager->get() called at [app\/code\/Amasty\/Sorting\/Helper\/Yotpo\/ApiClient.php:83]\n#5 Amasty\Sorting\Helper\Yotpo\ApiClient->construct() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/AbstractFactory.php:116]\n#6 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:108]\n#7 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:150]\n#8 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:79]\n#9 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:150]\n#10 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:79]\n#11 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:150]\n#12 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:125]\n#13 Magento\Framework\ObjectManager\Factory\Compiled->parseArray() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:86]\n#14 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:150]\n#15 Magento\Framework\ObjectManager\Factory\Compiled->get() called at [vendor\/magento\/framework\/ObjectManager\/Factory\/Compiled.php:79]\n#16 Magento\Framework\ObjectManager\Factory\Compiled->create() called at [vendor\/magento\/framework\/ObjectManager\/ObjectManager.php:70]\n#17 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor\/magento\/framework\/Interception\/PluginList\/PluginList.php:250]\n#18 Magento\Framework\Interception\PluginList\PluginList->getPlugin() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:144]\n#19 Magento\Catalog\Model\Config\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#20 Magento\Catalog\Model\Config\Interceptor->__callPlugins() called at [generated\/code\/Magento\/Catalog\/Model\/Config\/Interceptor.php:208]\n#21 Magento\Catalog\Model\Config\Interceptor->getAttributesUsedForSortBy() called at [vendor\/magento\/module-catalog\/Model\/Config.php:477]\n#22 Magento\Catalog\Model\Config->getAttributeUsedForSortByArray() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#23 Magento\Catalog\Model\Config\Interceptor->callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#24 Magento\Catalog\Model\Config\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#25 Magento\Catalog\Model\Config\Interceptor->_callPlugins() called at [generated\/code\/Magento\/Catalog\/Model\/Config\/Interceptor.php:221]\n#26 Magento\Catalog\Model\Config\Interceptor->getAttributeUsedForSortByArray() called at [vendor\/magento\/module-catalog\/Model\/Category.php:1118]\n#27 Magento\Catalog\Model\Category->getAvailableSortByOptions() called at [generated\/code\/Magento\/Catalog\/Model\/Category\/Interceptor.php:557]\n#28 Magento\Catalog\Model\Category\Interceptor->getAvailableSortByOptions() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:320]\n#29 Magento\Catalog\Block\Product\ListProduct->prepareSortableFieldsByCategory() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:472]\n#30 Magento\Catalog\Block\Product\ListProduct->initializeProductCollection() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:116]\n#31 Magento\Catalog\Block\Product\ListProduct->_getProductCollection() called at [vendor\/magento\/module-catalog\/Block\/Product\/ListProduct.php:139]\n#32 Magento\Catalog\Block\Product\ListProduct->getLoadedProductCollection() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#33 Magento\Catalog\Block\Product\ListProduct\Interceptor->__callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#34 Magento\Catalog\Block\Product\ListProduct\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#35 Magento\Catalog\Block\Product\ListProduct\Interceptor->callPlugins() called at [generated\/code\/Magento\/Catalog\/Block\/Product\/ListProduct\/Interceptor.php:26]\n#36 Magento\Catalog\Block\Product\ListProduct\Interceptor->getLoadedProductCollection() called at [app\/code\/WeltPixel\/GoogleTagManager\/Block\/Category.php:22]\n#37 WeltPixel\GoogleTagManager\Block\Category->getProductCollection()\n#38 call_user_func_array() called at [vendor\/magento\/framework\/View\/TemplateEngine\/Php.php:82]\n#39 Magento\Framework\View\TemplateEngine\Php->call() called at [app\/code\/WeltPixel\/GoogleTagManager\/view\/frontend\/templates\/category.phtml:7]\n#40 include() called at [vendor\/magento\/framework\/View\/TemplateEngine\/Php.php:59]\n#41 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor\/magento\/framework\/View\/Element\/Template.php:271]\n#42 Magento\Framework\View\Element\Template->fetchView() called at [vendor\/magento\/framework\/View\/Element\/Template.php:301]\n#43 Magento\Framework\View\Element\Template->_toHtml() called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:1094]\n#44 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:1098]\n#45 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:671]\n#46 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [app\/code\/WeltPixel\/GoogleTagManager\/Helper\/Data.php:357]\n#47 WeltPixel\GoogleTagManager\Helper\Data->addCategoryPageInformation() called at [app\/code\/WeltPixel\/GoogleTagManager\/Helper\/Data.php:289]\n#48 WeltPixel\GoogleTagManager\Helper\Data->getDataLayerScript() called at [app\/code\/WeltPixel\/GoogleTagManager\/Observer\/CoreLayoutRenderElementObserver.php:40]\n#49 WeltPixel\GoogleTagManager\Observer\CoreLayoutRenderElementObserver->execute() called at [vendor\/magento\/framework\/Event\/Invoker\/InvokerDefault.php:88]\n#50 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod() called at [vendor\/magento\/framework\/Event\/Invoker\/InvokerDefault.php:74]\n#51 Magento\Framework\Event\Invoker\InvokerDefault->dispatch() called at [vendor\/magento\/framework\/Event\/Manager.php:66]\n#52 Magento\Framework\Event\Manager->dispatch() called at [generated\/code\/Magento\/Framework\/Event\/Manager\/Proxy.php:95]\n#53 Magento\Framework\Event\Manager\Proxy->dispatch() called at [vendor\/magento\/framework\/View\/Layout.php:496]\n#54 Magento\Framework\View\Layout->renderElement() called at [generated\/code\/Magento\/Framework\/View\/Layout\/Interceptor.php:193]\n#55 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:522]\n#56 Magento\Framework\View\Element\AbstractBlock->getChildHtml() called at [vendor\/magento\/module-theme\/view\/frontend\/templates\/html\/container.phtml:10]\n#57 include() called at [vendor\/magento\/framework\/View\/TemplateEngine\/Php.php:59]\n#58 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor\/magento\/framework\/View\/Element\/Template.php:271]\n#59 Magento\Framework\View\Element\Template->fetchView() called at [vendor\/magento\/framework\/View\/Element\/Template.php:301]\n#60 Magento\Framework\View\Element\Template->_toHtml() called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:1094]\n#61 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:1098]\n#62 Magento\Framework\View\Element\AbstractBlock->loadCache() called at [vendor\/magento\/framework\/View\/Element\/AbstractBlock.php:671]\n#63 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor\/magento\/framework\/View\/Result\/Page.php:251]\n#64 Magento\Framework\View\Result\Page->render() called at [vendor\/magento\/framework\/View\/Result\/Layout.php:171]\n#65 Magento\Framework\View\Result\Layout->renderResult() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:58]\n#66 Magento\Framework\View\Result\Page\Interceptor->callParent() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:138]\n#67 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#68 Magento\Framework\View\Result\Page\Interceptor->___callPlugins() called at [generated\/code\/Magento\/Framework\/View\/Result\/Page\/Interceptor.php:130]\n#69 Magento\Framework\View\Result\Page\Interceptor->renderResult() called at [vendor\/magento\/framework\/App\/Http.php:141]\n#70 Magento\Framework\App\Http->launch() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:24]\n#71 Magento\Framework\App\Http\Interceptor->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:261]\n#72 Magento\Framework\App\Bootstrap->run() called at [pub\/index.php:40]\n<\/pre>","url":"\/humans.html","script_name":"\/index.php"}

SlavicB commented 5 years ago

@webamondo Category pages without Amasty Sorting Module works correctly?

MageLuingil commented 5 years ago

We see this issue as well.

"amasty/sorting": 2.5.4 "yotpo/module-review": 2.9.0

Exception #0 (ReflectionException): Class Yotpo\Yotpo\Helper\ApiClient does not exist

Downgrading yotpo/module-review to 2.8. or 2.7. gives this error instead (also thrown from amasty/sorting): Exception #0 (ReflectionException): Class Yotpo\Yotpo\Block\Config does not exist

Given that we're running Magento 2.2, I don't see any point in trying to downgrade any farther than this. I can post full stack traces if needed.

will-wright1 commented 5 years ago

@MageLuingil the fix for me was actually to upgrade amasty sorting, if you check amasty changelog you will see: 2.6.4 - Sep 25, 2019: Compatibility compatibility with Yotpo Reviews was enhanced

MageLuingil commented 5 years ago

@webamondo Yup, upgrading amasty/sorting fixes the issue for us as well. Looks like this issue might be on Amasty, not Yotpo.

yotpaul commented 5 years ago

@webamondo, @MageLuingil Thanks for the update, glad to see it was resolved.