Skip to content

Commit b68900d

Browse files
committed
Merge pull request #20 from magento-mpi/public-pulls
[Github] Merge public Github commits
2 parents 4ce64b6 + f4089aa commit b68900d

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

app/code/Magento/Catalog/Helper/Product/View.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -116,24 +116,26 @@ public function initProductLayout(ResultPage $resultPage, $product, $params = nu
116116
$pageConfig->setPageLayout($settings->getPageLayout());
117117
}
118118

119+
$urlSafeSku = rawurlencode($product->getSku());
120+
119121
// Load default page handles and page configurations
120122
if ($params && $params->getBeforeHandles()) {
121123
foreach ($params->getBeforeHandles() as $handle) {
122124
$resultPage->addPageLayoutHandles(
123-
['id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()],
125+
['id' => $product->getId(), 'sku' => $urlSafeSku, 'type' => $product->getTypeId()],
124126
$handle
125127
);
126128
}
127129
}
128130

129131
$resultPage->addPageLayoutHandles(
130-
['id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()]
132+
['id' => $product->getId(), 'sku' => $urlSafeSku, 'type' => $product->getTypeId()]
131133
);
132134

133135
if ($params && $params->getAfterHandles()) {
134136
foreach ($params->getAfterHandles() as $handle) {
135137
$resultPage->addPageLayoutHandles(
136-
['id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()],
138+
['id' => $product->getId(), 'sku' => $urlSafeSku, 'type' => $product->getTypeId()],
137139
$handle
138140
);
139141
}

app/code/Magento/PageCache/Model/Observer/ProcessLayoutRenderElement.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function _wrapEsi(
3737
'page_cache/block/esi',
3838
[
3939
'blocks' => json_encode([$block->getNameInLayout()]),
40-
'handles' => urlencode(json_encode($layout->getUpdate()->getHandles()))
40+
'handles' => json_encode($layout->getUpdate()->getHandles())
4141
]
4242
);
4343
return sprintf('<esi:include src="%s" />', $url);

app/code/Magento/Review/Controller/Product/ListAction.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ protected function _initProductLayout($product)
2525
$pageConfig->setPageLayout($product->getPageLayout());
2626
}
2727
$update = $this->_view->getLayout()->getUpdate();
28+
29+
$urlSafeSku = rawurlencode($product->getSku());
2830
$this->_view->addPageLayoutHandles(
29-
['id' => $product->getId(), 'sku' => $product->getSku(), 'type' => $product->getTypeId()]
31+
['id' => $product->getId(), 'sku' => $urlSafeSku, 'type' => $product->getTypeId()]
3032
);
3133

3234
$this->_view->loadLayoutUpdates();

lib/internal/Magento/Framework/View/Layout/Reader/Container.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public function interpret(Context $readerContext, Layout\Element $currentElement
8686
default:
8787
break;
8888
}
89-
return $this->readerPool->interpret($readerContext, $currentElement);
89+
$this->readerPool->interpret($readerContext, $currentElement);
90+
return $this;
9091
}
9192

9293
/**

lib/internal/Magento/Framework/View/Layout/Reader/Move.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function getSupportedNodes()
3434
public function interpret(Context $readerContext, Layout\Element $currentElement)
3535
{
3636
$this->scheduleMove($readerContext->getScheduledStructure(), $currentElement);
37-
return false;
37+
return $this;
3838
}
3939

4040
/**

lib/internal/Magento/Framework/View/Layout/Reader/Remove.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ public function interpret(Context $readerContext, Layout\Element $currentElement
3636
{
3737
$scheduledStructure = $readerContext->getScheduledStructure();
3838
$scheduledStructure->setElementToRemoveList((string)$currentElement->getAttribute('name'));
39-
return false;
39+
return $this;
4040
}
4141
}

lib/internal/Magento/Framework/View/Page/Config/Reader/Body.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ public function interpret(
6363
/** @var \Magento\Framework\View\Layout\Element $element */
6464
foreach ($bodyElement as $element) {
6565
if ($element->getName() === self::BODY_ATTRIBUTE) {
66-
$this->setBodyAttributeTosStructure($readerContext, $element);
66+
$this->setBodyAttributeToStructure($readerContext, $element);
6767
}
6868
}
69-
return $this->readerPool->interpret($readerContext, $bodyElement);
69+
$this->readerPool->interpret($readerContext, $bodyElement);
70+
return $this;
7071
}
7172

7273
/**
@@ -76,7 +77,7 @@ public function interpret(
7677
* @param Layout\Element $element
7778
* @return $this
7879
*/
79-
protected function setBodyAttributeTosStructure(Layout\Reader\Context $readerContext, Layout\Element $element)
80+
protected function setBodyAttributeToStructure(Layout\Reader\Context $readerContext, Layout\Element $element)
8081
{
8182
if ($element->getAttribute('name') == PageConfig::BODY_ATTRIBUTE_CLASS) {
8283
$readerContext->getPageConfigStructure()->setBodyClass($element->getAttribute('value'));

0 commit comments

Comments
 (0)