File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
app/code/Magento/Cms/Model/Page Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -164,10 +164,9 @@ private function getCurrentPage(): PageInterface
164
164
return $ this ->pageFactory ->create ();
165
165
}
166
166
$ this ->dataPersistor ->clear ('cms_page ' );
167
- $ page = $ this ->pageFactory ->create ()
168
- ->setData ($ data );
169
167
170
- return $ page ;
168
+ return $ this ->pageFactory ->create ()
169
+ ->setData ($ data );
171
170
}
172
171
173
172
/**
@@ -217,17 +216,14 @@ public function getMeta()
217
216
$ page = null ;
218
217
try {
219
218
$ page = $ this ->pageRepository ->getById ($ this ->getPageId ());
220
- } catch (LocalizedException $ e ) {
221
- $ this ->logger ->error ($ e ->getMessage ());
222
- }
223
-
224
- if ($ page ) {
225
219
if ($ page ->getCustomLayoutUpdateXml () || $ page ->getLayoutUpdateXml ()) {
226
220
$ options [] = ['label ' => 'Use existing layout update XML ' , 'value ' => '_existing_ ' ];
227
221
}
228
222
foreach ($ this ->customLayoutManager ->fetchAvailableFiles ($ page ) as $ layoutFile ) {
229
223
$ options [] = ['label ' => $ layoutFile , 'value ' => $ layoutFile ];
230
224
}
225
+ } catch (LocalizedException $ e ) {
226
+ $ this ->logger ->error ($ e ->getMessage ());
231
227
}
232
228
233
229
$ customLayoutMeta = [
You can’t perform that action at this time.
0 commit comments