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

Remember me template is not loaded from the original module #7273

Closed
MarekKarmelski opened this issue Nov 2, 2016 · 4 comments
Closed

Remember me template is not loaded from the original module #7273

MarekKarmelski opened this issue Nov 2, 2016 · 4 comments
Labels
Area: Frontend bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@MarekKarmelski
Copy link

Steps to reproduce

  1. Install Magento from 2.1.2 branch.
  2. Create a module with a preference for the Magento\Persistent\Block\Form\Remember
  3. Preference in di.xml:
    <preference for="Magento\Persistent\Block\Form\Remember" type="MyCompany\Module\Block\Persistent\Form\Remember" />
  4. Create your custom class:
<?php

namespace MyCompany\Module\Block\Persistent\Form;

class Remember extends \Magento\Persistent\Block\Form\Remember
{
}
  1. Reload your page.

Expected result

  1. Custom class is used
  2. No error.

Actual result

  1. Custom class is used
  2. An error is triggered:
    main.CRITICAL: Invalid template file: 'remember_me.phtml' in module: 'MyCompany_Module' block's name: 'persistent.remember.me' [] []

Cause

The template of this block is not prefixed with the module name:

https://github.com/magento/magento2/blob/2.1/app/code/Magento/Persistent/view/frontend/layout/customer_account_create.xml#L11

https://github.com/magento/magento2/blob/2.1/app/code/Magento/Persistent/view/frontend/layout/customer_account_login.xml#L11

Instead of :

<block class="Magento\Persistent\Block\Form\Remember" name="persistent.remember.me" template="remember_me.phtml" before="-"/>

It should be:

<block class="Magento\Persistent\Block\Form\Remember" name="persistent.remember.me" template="Magento_Persistent::remember_me.phtml" before="-"/>

@olysenko
Copy link

olysenko commented Nov 2, 2016

Hi, thank you for your report. This topic is in progress in scope of PR #1895. So I closed this conversation as duplicate and it could be continued in mentioned PR

@olysenko olysenko closed this as completed Nov 2, 2016
@orlangur
Copy link
Contributor

orlangur commented Nov 2, 2016

@olysenko what is the time frame for #1895 to be delivered? It exists for more than a year already and I don't observe any real movement in it.

@vkorotun
Copy link
Contributor

vkorotun commented Nov 3, 2016

Will be resolved within #1895 (Internal ticket: MAGETWO-60451)

@vkorotun vkorotun reopened this Nov 3, 2016
@vkorotun vkorotun added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Nov 3, 2016
@ishakhsuvarov
Copy link
Contributor

#1895 Has been delivered to the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

6 participants