Ignore enable fields in dataprocessors to avoid issues with deactivated offers

This commit is contained in:
Björn Fromme
2019-02-19 12:37:26 +01:00
parent 60f768a744
commit 7cd34d2c89
2 changed files with 30 additions and 2 deletions
@@ -66,10 +66,10 @@ class OfferProcessor implements DataProcessorInterface
$offerUid = (int) $cObj->data['tx_epevents_offer'];
if ($offerUid !== 0) {
/** @var \EP\EpEvents\Domain\Model\Offer $offer */
$offer = $repository->findByIdentifier($offerUid);
$offer = $repository->forceFindByUid($offerUid)->getFirst();
} else {
$pageUid = $GLOBALS['TSFE']->id;
$offer = $repository->findOneByDetailPage($pageUid);
$offer = $repository->forceFindByDetailPage($pageUid)->getFirst();
}
/** @var \EP\EpEvents\Domain\Model\Offer $offer */
$processedData['offer'] = $offer;