From 18757781bb577c1995df77f13de5ec8d3eb54cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 21 Oct 2026 15:29:32 +0200 Subject: [PATCH] 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 --- .ddev/config.yaml | 1 + config/sites/ski-wochenenden/config.yaml | 59 +++++++++++++++++++ .../Classes/ContentFeed/RecordFinder.php | 11 ++++ 3 files changed, 71 insertions(+) create mode 100644 config/sites/ski-wochenenden/config.yaml diff --git a/.ddev/config.yaml b/.ddev/config.yaml index cd8da4b..79d717a 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -11,6 +11,7 @@ additional_hostnames: - ser-ep13 - alvac-ep13 - cllt-ep13 + - skiwe-ep13 additional_fqdns: [] database: type: mariadb diff --git a/config/sites/ski-wochenenden/config.yaml b/config/sites/ski-wochenenden/config.yaml new file mode 100644 index 0000000..ab2a219 --- /dev/null +++ b/config/sites/ski-wochenenden/config.yaml @@ -0,0 +1,59 @@ +base: 'https://www.ski-wochenenden.de' +baseVariants: + - + base: 'https://skiwe-ep13.ddev.site' + condition: 'applicationContext == "Development"' +disableStaticFileCache: false +errorHandling: + - + errorCode: '404' + errorHandler: Page + errorContentSource: 't3://page?uid=608' +languages: + - + title: Deutsch + enabled: true + languageId: '0' + base: / + typo3Language: de + locale: de_DE.UTF-8 + iso-639-1: de + navigationTitle: Deutsch + hreflang: de-DE + direction: '' + flag: de +rootPageId: 14 +routeEnhancers: + StaticResultsPlugin: + type: Extbase + extension: EpProducts + plugin: staticresult + limitToPages: + - 1757 + routes: + - + routePath: '/{filter_settings}' + _controller: 'Search::staticresult' + _arguments: + filter_settings: encodedFilterSettings + defaultController: 'Search::staticresult' + requirements: + filter_settings: '[A-Z\d%\-\|]+' + aspects: + filter_settings: + type: PassthroughMapper + PageTypeSuffix: + type: PageType + default: / + index: '' + map: + /: 0 + /json: 1701 + /html: 1702 + sitemap.xml: 1533906435 + yoast-snippetpreview.json: 1480321830 +routes: + - + route: robots.txt + type: staticText + content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /typo3_src/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*\r\n" diff --git a/packages/ep_products/Classes/ContentFeed/RecordFinder.php b/packages/ep_products/Classes/ContentFeed/RecordFinder.php index f5668e9..9e99fc9 100644 --- a/packages/ep_products/Classes/ContentFeed/RecordFinder.php +++ b/packages/ep_products/Classes/ContentFeed/RecordFinder.php @@ -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)) + ); } } }