Skip to content

Commit 3942b6d

Browse files
author
Bohdan Korablov
committed
MAGETWO-43285: If you change page layout on grid, then the node of this page will be removed from hierarchy and Custom Theme will be changed to "Magento Blank"
1 parent 22629ab commit 3942b6d

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

app/code/Magento/Cms/Block/Adminhtml/Page/Edit/Tab/Design.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ protected function _prepareForm()
156156
);
157157

158158
$designFieldset->addField(
159-
'custom_page_layout',
159+
'custom_root_template',
160160
'select',
161161
[
162-
'name' => 'custom_page_layout',
162+
'name' => 'custom_root_template',
163163
'label' => __('Custom Layout'),
164164
'values' => $this->pageLayoutBuilder->getPageLayoutsConfig()->toOptionArray(true),
165165
'disabled' => $isElementDisabled

app/code/Magento/Cms/Model/Page/Source/Theme.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function __construct(ListInterface $themeList)
3535
*/
3636
public function toOptionArray()
3737
{
38-
return $this->themeList->getLabels();
38+
$options[] = ['label' => 'Default', 'value' => ''];
39+
return array_merge($options, $this->themeList->getLabels());
3940
}
4041
}

app/code/Magento/Cms/Test/Unit/Model/Page/Source/ThemeFilterTest.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,18 @@ public function getOptionsDataProvider()
2323
return [
2424
[
2525
[],
26-
[['label' => '', 'value' => '']],
26+
[
27+
['label' => '', 'value' => ''],
28+
['label' => 'Default', 'value' => ''],
29+
],
2730
],
2831
[
2932
[['label' => 'testValue', 'value' => 'testStatus']],
30-
[['label' => '', 'value' => ''], ['label' => 'testValue', 'value' => 'testStatus']],
33+
[
34+
['label' => '', 'value' => ''],
35+
['label' => 'Default', 'value' => ''],
36+
['label' => 'testValue', 'value' => 'testStatus']],
3137
],
32-
3338
];
3439
}
3540
}

0 commit comments

Comments
 (0)