Skip to content
Snippets Groups Projects
Commit f55c7e0f authored by Mathias Brodala's avatar Mathias Brodala Committed by Andreas Fernandez
Browse files

[BUGFIX] Respect format when rendering partial

The request format needs to be respected when rendering partials,
otherwise the same partial cannot be rendered in different formats
in the same request.

An example is rendering mails in plain text and HTML.

Resolves: #60338
Releases: master, 6.2
Change-Id: I118ee0a535d0f06391cd802c10d7c3c5129c2a2c
Reviewed-on: http://review.typo3.org/35475


Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
parent d5c900b2
Branches
Tags
No related merge requests found
......@@ -253,10 +253,11 @@ abstract class AbstractTemplateView implements \TYPO3\CMS\Extbase\Mvc\View\ViewI
* @return string
*/
public function renderPartial($partialName, $sectionName, array $variables) {
if (!isset($this->partialIdentifierCache[$partialName])) {
$this->partialIdentifierCache[$partialName] = $this->getPartialIdentifier($partialName);
$partialNameWithFormat = $partialName . '.' . $this->controllerContext->getRequest()->getFormat();
if (!isset($this->partialIdentifierCache[$partialNameWithFormat])) {
$this->partialIdentifierCache[$partialNameWithFormat] = $this->getPartialIdentifier($partialName);
}
$partialIdentifier = $this->partialIdentifierCache[$partialName];
$partialIdentifier = $this->partialIdentifierCache[$partialNameWithFormat];
if ($this->templateCompiler->has($partialIdentifier)) {
$parsedPartial = $this->templateCompiler->get($partialIdentifier);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment