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

Customer Login Block sets the title for the page when rendered #13982

Closed
matthew-muscat opened this issue Mar 7, 2018 · 4 comments
Closed

Customer Login Block sets the title for the page when rendered #13982

matthew-muscat opened this issue Mar 7, 2018 · 4 comments
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@matthew-muscat
Copy link
Contributor

The Customer Login Block, defined as Magento\Customer\Block\Form\Login currently has logic that would set the overall page title, which is unexpected behaviour.

It is assumed that the layout xml, or the controller, would be responsible for setting the page title, and that if the Customer Login Block was to be included in other areas of the Magento Site, that it would not affect the overall page title.

The logic that is causing this behaviour can be located at

$this->pageConfig->getTitle()->set(__('Customer Login'));

Preconditions

  1. The block behaviour affects all current M2 versions (this issue is also present in M1)
  2. The behaviour occurs when the block is rendered on a page other than the login page — ie: a custom page that includes the login block

Steps to reproduce

  1. Include the Customer Login Block within any other page of the Magento system
  2. Verify that the page title has been updated to "Customer Login", based on the block being rendered.

Example Situation where this may occur

  • The login block is added to a custom page — the login action is not the primary purpose of the page, but, due to the current block logic, the title of the page may be updated to "Customer Login"

Expected result

  1. The block should not be responsible for setting the overall page title, as the block's responsibilities only relate to rendering the contents of the block

Actual result

  1. The page title is updated to "Customer Login" whenever the login block is included on a page

Proposed changes

  1. Update the Customer Login Block to remove the references to setting the page title within the block
  2. Update the Customer Login page layout to set the title via the layout XML
  3. Determine if the Customer Login Block is used on any other pages and update the page title accordingly (as per item 2 above)
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Mar 7, 2018
@magento-engcom-team
Copy link
Contributor

@matthew-muscat, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Mar 7, 2018
@Frodigo Frodigo self-assigned this Mar 14, 2018
Frodigo added a commit to Frodigo/magento2 that referenced this issue Mar 14, 2018
…rendered

- Moving the login page title setting from Login Block to cutomer_account_login layout
@lisovyievhenii lisovyievhenii self-assigned this Jan 24, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jan 24, 2019

Hi @lisovyievhenii. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

lisovyievhenii added a commit to lisovyievhenii/magento2 that referenced this issue Jan 24, 2019
…rendered. Move setPageTitle from Block to layout configs
lisovyievhenii added a commit to lisovyievhenii/magento2 that referenced this issue Jan 25, 2019
@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Feb 25, 2019
@magento-engcom-team
Copy link
Contributor

Hi @matthew-muscat. Thank you for your report.
The issue has been fixed in #20583 by @lisovyievhenii in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Feb 25, 2019
…rendered. Move setPageTitle from Block to layout configs
amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Feb 25, 2019
@magento-engcom-team
Copy link
Contributor

Hi @matthew-muscat. Thank you for your report.
The issue has been fixed in #21434 by @amol2jcommerce in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.9 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

4 participants