-
Notifications
You must be signed in to change notification settings - Fork 9.4k
FIX for issue #15501 - M2.2.4 missing meta title tag and doesn't show… #15532
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
Changes from 1 commit
0a38b84
85ac3be
432cf00
1413d65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,7 +136,9 @@ public function renderMetadata() | |
| protected function processMetadataContent($name, $content) | ||
| { | ||
| $method = 'get' . $this->string->upperCaseWords($name, '_', ''); | ||
| if (method_exists($this->pageConfig, $method)) { | ||
|
|
||
| // We skip title, because PageConfig::getTitle() refers to the tag <title> and not to meta title. | ||
| if (!in_array($name, ['title']) && method_exists($this->pageConfig, $method)) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use simple
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For readability, in case we need more methods to be skipped, but if you prefer I can refactor it with a single check
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd also suggest to keep a single check. I assume it's not the best way to skip more methods anyway, so if we would need more then we also would need a different solution. |
||
| $content = $this->pageConfig->$method(); | ||
| } | ||
| return $content; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add type hint to the method to have more strict interface. Also to be consistent with other methods in this class it would be good to add corresponding getter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the whole class or just this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the class only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, but if I am going to refactor with strict types for the class, I risk to add a backward incompatiblity. Are you sure?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes for method only, I was saying something totally wrong on the previous comment. Sorry for the confusion.