Skip to content

Commit f7ed1a8

Browse files
Merge remote-tracking branch 'origin/BUGS' into MAGETWO-13915
2 parents f5c8db9 + 3ea0eab commit f7ed1a8

File tree

6 files changed

+45
-12
lines changed

6 files changed

+45
-12
lines changed

app/code/Magento/Core/Model/Layout/Merge.php

+34-6
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,27 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface
132132
*/
133133
protected $cacheSuffix;
134134

135+
/**
136+
* Status for new added handle
137+
*
138+
* @var int
139+
*/
140+
protected $handleAdded = 1;
141+
142+
/**
143+
* Status for handle being processed
144+
*
145+
* @var int
146+
*/
147+
protected $handleProcessing = 2;
148+
149+
/**
150+
* Status for processed handle
151+
*
152+
* @var int
153+
*/
154+
protected $handleProcessed = 3;
155+
135156
/**
136157
* Init merge model
137158
*
@@ -217,10 +238,10 @@ public function addHandle($handleName)
217238
{
218239
if (is_array($handleName)) {
219240
foreach ($handleName as $name) {
220-
$this->_handles[$name] = 1;
241+
$this->_handles[$name] = $this->handleAdded;
221242
}
222243
} else {
223-
$this->_handles[$handleName] = 1;
244+
$this->_handles[$handleName] = $this->handleAdded;
224245
}
225246
return $this;
226247
}
@@ -476,8 +497,17 @@ protected function _loadXmlString($xmlString)
476497
*/
477498
protected function _merge($handle)
478499
{
479-
$this->_fetchPackageLayoutUpdates($handle);
480-
$this->_fetchDbLayoutUpdates($handle);
500+
if (!isset($this->_handles[$handle]) || $this->_handles[$handle] == $this->handleAdded) {
501+
$this->_handles[$handle] = $this->handleProcessing;
502+
$this->_fetchPackageLayoutUpdates($handle);
503+
$this->_fetchDbLayoutUpdates($handle);
504+
$this->_handles[$handle] = $this->handleProcessed;
505+
} elseif ($this->_handles[$handle] == $this->handleProcessing
506+
&& $this->_appState->getMode() === \Magento\Framework\App\State::MODE_DEVELOPER
507+
) {
508+
$this->_logger->addStreamLog(\Magento\Framework\Logger::LOGGER_SYSTEM);
509+
$this->_logger->log('Cyclic dependency in merged layout for handle: ' . $handle, \Zend_Log::ERR);
510+
}
481511
return $this;
482512
}
483513

@@ -572,8 +602,6 @@ protected function _fetchRecursiveUpdates($updateXml)
572602
foreach ($updateXml->children() as $child) {
573603
if (strtolower($child->getName()) == 'update' && isset($child['handle'])) {
574604
$this->_merge((string)$child['handle']);
575-
// Adding merged layout handle to the list of applied handles
576-
$this->addHandle((string)$child['handle']);
577605
}
578606
}
579607
if (isset($updateXml['layout'])) {

app/code/Magento/Customer/etc/data_source/customer.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</constraints>
2020
<tooltip>
2121
<link>http://www.magentocommerce.com/knowledge-base/entry/understanding-store-scopes</link>
22-
<description>If your Magento Go site has multiple views, you can set the scope to apply to a specific view.</description>
22+
<description>If your Magento site has multiple views, you can set the scope to apply to a specific view.</description>
2323
</tooltip>
2424
</field>
2525
<field name="prefix" source="eav" dataType="text"/>

app/code/Magento/Review/view/frontend/layout/checkout_cart_configure.xml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
-->
77
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
8+
<update handle="catalog_product_view"/>
89
<body>
910
<referenceBlock name="reviews.tab">
1011
<block class="Magento\Review\Block\Form\Configure" name="product.review.form" as="review_form">

app/code/Magento/Review/view/frontend/layout/wishlist_index_configure.xml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
-->
77
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
8+
<update handle="catalog_product_view"/>
89
<body>
910
<referenceBlock name="reviews.tab">
1011
<block class="Magento\Review\Block\Form\Configure" name="product.review.form" as="review_form">

app/code/Magento/Widget/Model/Config/Converter.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function convert($source)
8484
}
8585

8686
/**
87-
* Convert dom Container node to magneto array
87+
* Convert dom Container node to Magento array
8888
*
8989
* @param \DOMNode $source
9090
* @return array
@@ -240,7 +240,7 @@ protected function _convertDepends($source)
240240
}
241241

242242
/**
243-
* Convert dom Renderer node to magneto array
243+
* Convert dom Renderer node to Magento array
244244
*
245245
* @param \DOMNode $source
246246
* @return array
@@ -265,7 +265,7 @@ protected function _convertBlock($source)
265265
}
266266

267267
/**
268-
* Convert dom Data node to magneto array
268+
* Convert dom Data node to Magento array
269269
*
270270
* @param \DOMElement $source
271271
* @return array
@@ -289,7 +289,7 @@ protected function _convertData($source)
289289
}
290290

291291
/**
292-
* Convert dom Option node to magneto array
292+
* Convert dom Option node to Magento array
293293
*
294294
* @param \DOMNode $source
295295
* @return array

dev/tests/functional/.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
/generated
44
/var
55
/config/*
6-
!/config/*.dist
6+
!/config/application.yml.dist
7+
!/config/handler.yml.dist
8+
!/config/isolation.yml.dist
9+
!/config/server.yml.dist
710
phpunit.xml
811
/lib/Mtf/Util/Generate/testcase.xml

0 commit comments

Comments
 (0)