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

[Backport] Fix meta title property #1

Closed
wants to merge 180 commits into from

Conversation

slackerzz
Copy link
Owner

Original Pull Request

magento#11368

Description

If, inside a controller you try to set metadata title with:

$resultPage->getConfig()->setMetadata('title', 'some meta title');

you will get an error on frontend:

Recoverable Error: Object of class Magento\Framework\View\Page\Title could not be converted to string...

becouse processMetadataContent will return an istance of Magento\Framework\View\Page\Title instead of a string.

Fixed Issues (if relevant)

  1. Unable to render page when 'meta title' page config param is set magento/magento2#2956: Unable to render page when 'meta title' page config param is set

Manual testing scenarios

Scenario 1

  1. Create a controller
  2. Inside the execute function add:
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle->set('my title');
$resultPage->getConfig()->setMetadata('title', 'metatitle');
return $resultPage;
  1. As result you will have in your page:
<title>my title</title>
<meta name="title" content="metatitle"/>

Scenario 2

  1. Create a controller
  2. Inside the execute function add:
$resultPage = $this->resultPageFactory->create();
$resultPage->getConfig()->getTitle->set('my title');
return $resultPage;
  1. As result you will have in your page:
<title>my title</title>
<meta name="title" content="my title"/>

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

scottsb and others added 30 commits November 16, 2017 14:43
- removed private function isPost
- removed unused imports
- added request method isPost
- added interface that expands HTTP request class
- fixed unit test in Contact module
- fixed integration tests in Contact module
This would happen if for some reason the area code wasn't set
…2314

 - Merge Pull Request magento#12314 from scottsb/magento2:fix-layout-duplication
 - Merged commits:
   1. a97cc6d
# Conflicts:
#	app/code/Magento/Catalog/etc/frontend/di.xml
 - Suppresses coupling warning in unit test
…s not remove it from… magento#15019

 - Merge Pull Request magento#15019 from magento/magento2:experius-2.2-patch-issue-14966
 - Merged commits:
   1. 0d35081
   2. c6196d7
   3. 2d6fb62
   4. 38bd9d3
   5. 219024c
…magento2ce into ENGCOM-1463-magento-magento2-15019
…m/magento2ce into MAGETWO-84109-magento-magento2-12314
VladimirZaets and others added 25 commits June 7, 2018 10:30
Accepted Public Pull Requests:
 - magento#15322: ISSUE-11477 - fixed Swagger response for searchCriteria (by @idziakjakub)
 - magento#15320: issue/14056 - Coupon API not working for guest user (by @Hypo386)
 - magento#12626: Fixed condition with usage "hack" isPostRequest method (by @pusachev)
 - magento#15661: Fixed Wrong order amount on dashboard on Last orders listing when having more than one website with different currencies (by @ankurvr)
 - magento#15689: magento#15588 Fixed incorrect image urls in multistore xml sitemap (by @StevenGuapaBV)
 - magento#15826: Add missing table aliases to fields mapping for Customer Group filter� (by @radio)
 - magento#12935: Add Ability To Separate Frontend / Adminhtml in New Relic (by @mpchadwick)
 - magento#15019: [TASK] Solve issue magento#14966 - Disabling product does not remove it from� (by @lewisvoncken)
 - magento#15297: Fix typo in test method's name and test result (by @dmytro-ch)


Fixed GitHub Issues:
 - magento#11477: Magento REST API Schema (Swagger) is not compatible with Search Criteria (reported by @careys7) has been fixed in magento#15322 by @idziakjakub in 2.2-develop branch
   Related commits:
     1. 788485a

 - magento#14056: Coupon API not working for guest user (reported by @gnanasekaranl) has been fixed in magento#15320 by @Hypo386 in 2.2-develop branch
   Related commits:
     1. 6ad9c03
     2. 8b7bb58

 - magento#15660: Wrong order amount on dashboard on Last orders listing when having more than one website with different currencies (reported by @ankurvr) has been fixed in magento#15661 by @ankurvr in 2.2-develop branch
   Related commits:
     1. 56bcffb
     2. 1c1e277

 - magento#15588: Images in XML sitemap are always linked to base store in multistore (reported by @dvershinin) has been fixed in magento#15689 by @StevenGuapaBV in 2.2-develop branch
   Related commits:
     1. 7b8fe3d
     2. 498047c
     3. 63ed864
     4. 83ad777
     5. 6a490a8
     6. f1dd4e8
     7. b7f8d28

 - magento#15822: SQL Error: ambiguous column 'customer_group_id' in 'All customers' page in admin when extension attribute table is joined (reported by @radio) has been fixed in magento#15826 by @radio in 2.2-develop branch
   Related commits:
     1. 83a8dea

 - magento#14966: Disabling product does not remove it from the flat index (reported by @ktruehl) has been fixed in magento#15019 by @lewisvoncken in 2.2-develop branch
   Related commits:
     1. 0d35081
     2. c6196d7
     3. 2d6fb62
     4. 38bd9d3
     5. 219024c
…o\Framework\D… magento#15892

 - Merge Pull Request magento#15892 from NamrataChangani/magento2:nps-comment-issue-1
 - Merged commits:
   1. 811bf10
   2. 27df0e9
 - Merge Pull Request magento#15891 from saurabh-aureate/magento2:saurabh-patch-11
 - Merged commits:
   1. 0757a81
 - merged latest code from mainline branch
 - merged latest code from mainline branch
Accepted Public Pull Requests:
 - magento#15891: Remove parameter from method calling (by @saurabh-aureate)
 - magento#15892: Wrong annotation in _toOptionArray : lib\internal\Magento\Framework\D� (by @namratachangani)
 - magento#15888: Correct typo correction js files (by @saurabh-aureate)
 - magento#13862: Add compare list link to success message after adding a product (by @avstudnitz)
MAGETWO-86125: Sorting on price of configurable products in catalog not working properly
…tests-namespace-agnostic

[borg] MAGETWO-92468: Make PR testsuite namespace-agnostic
@slackerzz slackerzz closed this Jun 12, 2018
@slackerzz slackerzz deleted the 2.2-develop-PR-port-11368 branch June 19, 2018 12:24
slackerzz pushed a commit that referenced this pull request Mar 7, 2019
[Forwardport] 'Fixes-for-customer-login-page-input-field' :: On customer login page…
slackerzz pushed a commit that referenced this pull request Apr 19, 2019
Removed two times zlib.output_compression on
slackerzz pushed a commit that referenced this pull request May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.