Skip to content

Commit 125ffb0

Browse files
Merge pull request #19 from julienanquetil/patch-1
Update Processor.php
2 parents 939dd7d + bbef0d7 commit 125ffb0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Model/Processor.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,13 @@ private function runIndividualComponents(): void
174174
$masterConfig = $master[$componentAlias];
175175

176176
// Run that component
177+
$areaCode = ($componentAlias === 'pages') ? Area::AREA_FRONTEND : Area::AREA_ADMINHTML;
177178
$this->state->emulateAreaCode(
178-
Area::AREA_ADMINHTML,
179+
$areaCode,
179180
[$this, 'runComponent'],
180181
[$componentAlias, $masterConfig]
181182
);
183+
182184
}
183185
} catch (ComponentException $e) {
184186
$this->log->logError($e->getMessage());
@@ -198,11 +200,13 @@ private function runAllComponents(): void
198200
// Loop through components and run them individually in the master.yaml order
199201
foreach ($master as $componentAlias => $componentConfig) {
200202
// Run the component in question
203+
$areaCode = ($componentAlias === 'pages') ? Area::AREA_FRONTEND : Area::AREA_ADMINHTML;
201204
$this->state->emulateAreaCode(
202-
Area::AREA_ADMINHTML,
205+
$areaCode,
203206
[$this, 'runComponent'],
204207
[$componentAlias, $componentConfig]
205208
);
209+
206210
}
207211
} catch (ComponentException $e) {
208212
$this->log->logError($e->getMessage());

0 commit comments

Comments
 (0)