cancel
Showing results for 
Search instead for 
Did you mean: 

Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not exist

Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not exist

Hey guys, 

I am trying to migrate from M1 to M2, so I installed a M2 store on the test server. After following several tutorials I set up the migration tool and started the migration. 

 

 

After migrating the  settings with:

bin/magento migrate:settings -r vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.4.0/config.xml

I end up with an error whilst trying to access the page:

1 exception(s):
Exception #0 (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not exist

Exception #0 (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not exist
<pre>#1 Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Captcha\...') called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:49]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\Captcha\...') called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:48]
#3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Captcha\...', array('formId' => 'user_login')) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#4 Magento\Framework\ObjectManager\ObjectManager->create('Magento\Captcha\...', array('formId' => 'user_login')) called at [vendor/magento/module-captcha/Model/CaptchaFactory.php:37]
#5 Magento\Captcha\Model\CaptchaFactory->create('Recaptcha', 'user_login') called at [vendor/magento/module-captcha/Helper/Data.php:100]
#6 Magento\Captcha\Helper\Data->getCaptcha('user_login') called at [vendor/magento/module-captcha/Model/Checkout/ConfigProvider.php:130]
#7 Magento\Captcha\Model\Checkout\ConfigProvider->getCaptchaModel('user_login') called at [vendor/magento/module-captcha/Model/Checkout/ConfigProvider.php:70]
#8 Magento\Captcha\Model\Checkout\ConfigProvider->isCaseSensitive('user_login') called at [vendor/magento/module-captcha/Model/Checkout/ConfigProvider.php:51]
#9 Magento\Captcha\Model\Checkout\ConfigProvider->getConfig() called at [vendor/magento/module-captcha/Model/Cart/ConfigPlugin.php:33]
#10 Magento\Captcha\Model\Cart\ConfigPlugin->afterGetConfig(&Magento\Checkout\Block\Cart\Sidebar\Interceptor#0000000013a6aa920000000022c6f811#, array('shoppingCartUrl' => 'https://cyclocla...', 'checkoutUrl' => 'https://cyclocla...', 'updateItemQtyUrl' => 'http://cycloclas...', 'removeItemUrl' => 'http://cycloclas...', 'imageTemplate' => 'Magento_Catalog/...', 'baseUrl' => 'http://cycloclas...', 'minicartMaxItems...' => 3, 'websiteId' => 1, 'maxItemsToDispla...' => 10, 'storeId' => 1, 'customerLoginUrl' => 'https://cyclocla...', 'isRedirectRequir...' => true, 'autocomplete' => 'off')) called at [vendor/magento/framework/Interception/Interceptor.php:146]
#11 Magento\Checkout\Block\Cart\Sidebar\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#12 Magento\Checkout\Block\Cart\Sidebar\Interceptor->___callPlugins('getConfig', array(), array(array('customer_cart', 'login_captcha'))) called at [generated/code/Magento/Checkout/Block/Cart/Sidebar/Interceptor.php:26]
#13 Magento\Checkout\Block\Cart\Sidebar\Interceptor->getConfig() called at [vendor/magento/module-checkout/Block/Cart/Sidebar.php:99]
#14 Magento\Checkout\Block\Cart\Sidebar->getSerializedConfig() called at [generated/code/Magento/Checkout/Block/Cart/Sidebar/Interceptor.php:37]
#15 Magento\Checkout\Block\Cart\Sidebar\Interceptor->getSerializedConfig() called at [vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml:52]
#16 include('/usr/www/users/d...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#17 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Checkout\Block\Cart\Sidebar\Interceptor#0000000013a6aa920000000022c6f811#, '/usr/www/users/d...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#18 Magento\Framework\View\Element\Template->fetchView('/usr/www/users/d...') called at [generated/code/Magento/Checkout/Block/Cart/Sidebar/Interceptor.php:310]
#19 Magento\Checkout\Block\Cart\Sidebar\Interceptor->fetchView('/usr/www/users/d...') called at [vendor/magento/framework/View/Element/Template.php:301]
#20 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1097]
#21 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1101]
#22 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:671]
#23 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Magento/Checkout/Block/Cart/Sidebar/Interceptor.php:622]
#24 Magento\Checkout\Block\Cart\Sidebar\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#25 Magento\Framework\View\Layout->_renderBlock('minicart') called at [vendor/magento/framework/View/Layout.php:533]
#26 Magento\Framework\View\Layout->renderNonCachedElement('minicart') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#27 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('minicart') called at [vendor/magento/framework/View/Layout.php:488]
#28 Magento\Framework\View\Layout->renderElement('minicart', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#29 Magento\Framework\View\Layout\Interceptor->renderElement('minicart', false) called at [vendor/magento/framework/View/Layout.php:585]
#30 Magento\Framework\View\Layout->_renderContainer('header-wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#31 Magento\Framework\View\Layout->renderNonCachedElement('header-wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#32 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header-wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#33 Magento\Framework\View\Layout->renderElement('header-wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#34 Magento\Framework\View\Layout\Interceptor->renderElement('header-wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#35 Magento\Framework\View\Layout->_renderContainer('header.container', false) called at [vendor/magento/framework/View/Layout.php:535]
#36 Magento\Framework\View\Layout->renderNonCachedElement('header.container') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#37 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('header.container') called at [vendor/magento/framework/View/Layout.php:488]
#38 Magento\Framework\View\Layout->renderElement('header.container', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#39 Magento\Framework\View\Layout\Interceptor->renderElement('header.container', false) called at [vendor/magento/framework/View/Layout.php:585]
#40 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#41 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#42 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#43 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#44 Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#45 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:535]
#46 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#47 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:488]
#48 Magento\Framework\View\Layout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#49 Magento\Framework\View\Layout\Interceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:954]
#50 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#51 Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#52 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#53 Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#54 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#55 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#0000000013a6aef90000000022c6f811#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#56 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#0000000013a6aef90000000022c6f811#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#57 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#0000000013a6aef90000000022c6f811#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#58 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#0000000013a6aef90000000022c6f811#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#59 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#0000000013a6aef90000000022c6f811#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#60 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#0000000013a6aef90000000022c6f811#) called at [vendor/magento/framework/App/Http.php:141]
#61 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#62 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#63 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#0000000013a6aef20000000022c6f811#) called at [index.php:39]
</pre>

It says that the 

Class Magento\Captcha\Model\Recaptcha doesn't exist

 I looked into the vendor/magento/module-captcha/Model/ folder and there is no such class.

 

Is there suppose to be this class?

 

8 REPLIES 8

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Hi @steelvintage 

 

Go through the following link https://www.goivvy.com/blog/magento-2-migration and check if you have miss any step.

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Hi, @Rahul Gupta,

 

thanks for your reply.

 

I followed all of the steps and the core_config_file for example has been migrated properly.

 

But when trying to access the website after the command:

php bin/magento migrate:settings vendor/magento/data-migration-tool/etc/opensource-to-opensource/x.x.x/config.xml

The mentioned error appears.

Any other ideas?

 

Thanks

 

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Hi @steelvintage 

 

Have you checked all the permissions?

 

Also flush the cache after the process ended.

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".

 

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Hi @Rahul Gupta ,

 

what permissions are you referring to?

 

yeah flushed the cache, but no change.

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Hi @steelvintage 

 

Try by running the following command.

 

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

chmod 777 -R var/ generated/ pub/static/

Thanks.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Hi @Rahul Gupta,

 

I have tried all of that, but still no change.

 

Is there suppose to be a Recaptcha class?

 

Thanks

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Recaptcha is not available in magento so you need to set it up

Re: Migration M1 to M2, but (ReflectionException): Class Magento\Captcha\Model\Recaptcha does not ex

Hi @louis_thomsen,

 

looking at the class, it seems like it is looking for a class in Captcha. I don't think installing Google's reCaptcha will help here?