Skip to content

Commit

Permalink
Fix #30 which can occurs when using sample data modules on a custom t…
Browse files Browse the repository at this point in the history
…heme
  • Loading branch information
romainruaud committed Mar 20, 2020
1 parent 34264fe commit cd07d0d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Model/Page/Indexer/Fulltext/Action/Full.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Magento\Cms\Model\Template\FilterProvider;
use Magento\Framework\App\Area;
use Magento\Framework\App\AreaList;
use Magento\Store\Model\App\Emulation;

/**
* ElasticSearch CMS Pages full indexer
Expand Down Expand Up @@ -79,7 +80,12 @@ public function rebuildStoreIndex($storeId, $cmsPageIds = null)
{
$lastCmsPageId = 0;

$this->areaList->getArea(Area::AREA_FRONTEND)->load(Area::PART_DESIGN);
try {
$this->areaList->getArea(Area::AREA_FRONTEND)->load(Area::PART_DESIGN);
} catch (\InvalidArgumentException | \LogicException $exception) {
// Can occur especially when magento sample data are triggering a full reindex.
;
}

do {
$cmsPages = $this->getSearchableCmsPage($storeId, $cmsPageIds, $lastCmsPageId);
Expand Down

0 comments on commit cd07d0d

Please sign in to comment.