Skip to content

[Forwardport] Fix $useCache for container child blocks #14214

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/internal/Magento/Framework/View/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public function renderNonCachedElement($name)
} elseif ($this->isBlock($name)) {
$result = $this->_renderBlock($name);
} else {
$result = $this->_renderContainer($name);
$result = $this->_renderContainer($name, false);
}
} catch (\Exception $e) {
if ($this->appState->getMode() === AppState::MODE_DEVELOPER) {
Expand Down Expand Up @@ -575,14 +575,15 @@ protected function _renderUiComponent($name)
* Gets HTML of container element
*
* @param string $name
* @param bool $useCache
* @return string
*/
protected function _renderContainer($name)
protected function _renderContainer($name, $useCache = true)
{
$html = '';
$children = $this->getChildNames($name);
foreach ($children as $child) {
$html .= $this->renderElement($child);
$html .= $this->renderElement($child, $useCache);
}
if ($html == '' || !$this->structure->getAttribute($name, Element::CONTAINER_OPT_HTML_TAG)) {
return $html;
Expand Down