cancel
Showing results for 
Search instead for 
Did you mean: 

CAPTCHA form not working, after applying theme

SOLVED

CAPTCHA form not working, after applying theme

Hi there,

I'm using magento 2.2, I've enabled Admin-Panel -> Store -> Customers -> Customer Configuration -> CAPTCHA and enabled it for following forms: "Create user", "Login", "Forgot password".


The "Login" case:
The captcha works well on default theme (LUMA theme).But when I'm using another theme, the Captcha image (or the Captcha form with message and image) is not showed up, and I'm ending up with "Incorrect CAPTCHA".

I tried to find any related forum thread about this, but I wasn't able to find something that is well described.
I checked all file permissions and those are OK, I've checked magento logs no exception there.



My theme has the following structure:
        /app/code
        /app/design/frontend/Theme_name/some_name/      

 -  This contain (beside others folders and files like /etc and so on) a theme.xml file that point to the parent_theme folder
        /app/design/frontend/Theme_name/parent_theme        
        
        
On the parent_theme I have the
        /parent_theme/Magento_Customer/layout            - this contains "customer_account_login.xml" which is almost identical with the one from -> customer_account_login.xml  and to what I have on Magento-CE-2.2.2-2017-12-11-09-19-32/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml
        
        From  what I could understand here will fill with the captcha form.
       

<container name="customer.login.container.before" htmlTag="div" htmlClass="col-sm-6 col-xs-12" before="-">
                    <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="form/login.phtml">
                        <container name="form.additional.info" as="form_additional_info"/>
                    </block>
</container>


        
        
        
         parent_theme/Magento_Customer/layout/templates/form/login.phtml    - which is similar to login.phtml


 - In this file I have the <?= $block->getChildHtml('form_additional_info') ?>, only design is different.
                                                                            
        
I tried everything, I also overwrite those file with default one (from https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Customer/view/frontend/), design was changing but Captcha form wasn't showing up.


I tend to think that my theme is missing something, I read somewhere that captcha layout should be overwrite in order to make it visible but no detailed on how to do that.

Can someone who hit this problem, or has experience on making themes let me know what I'm missing?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: CAPTCHA form not working, after applying theme

The answer and solution to my question can be found here. Thank you all !

View solution in original post

1 REPLY 1

Re: CAPTCHA form not working, after applying theme

The answer and solution to my question can be found here. Thank you all !