fix: content feed matches TYPO3 10 for news and sites

- News records: EXT:news is not installed, so the default restrictions
  lack its TCA; deleted, hidden, starttime and endtime are applied by
  hand (TYPO3 13 listed 37 deleted or hidden news in the manifest)
- Site config ski-wochenenden is back: the content feed lists it
  (contentFeedSites); DDEV host skiwe-ep13.ddev.site

Compared with the TYPO3 10 project on the same database (912 cases):
240 identical, 665 differ only because TYPO3 13 leaves out hidden
file references in image lists, 7 only in the order of MM relations
with equal sorting values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-21 15:29:32 +02:00
1 parent a912e0c614
commit 18757781bb
3 files changed
+71

No files matched your search

@@ -2,9 +2,11 @@
namespace EP\EpProducts\ContentFeed;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Which records the content feed publishes. The manifest and the records endpoint both go
@@ -143,6 +145,15 @@ class RecordFinder
$expr->eq('type', $queryBuilder->createNamedParameter('0')),
$expr->in('fe_group', $queryBuilder->createNamedParameter(['', '0'], Connection::PARAM_STR_ARRAY))
);
// EXT:news is not installed, so without its TCA the default restrictions do not know
// the deleted/hidden/starttime/endtime fields of the table: apply them by hand.
$now = (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp');
$queryBuilder->andWhere(
$expr->eq('deleted', 0),
$expr->eq('hidden', 0),
$expr->lte('starttime', $now),
$expr->or($expr->eq('endtime', 0), $expr->gt('endtime', $now))
);
}
}
}