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)) + ); } } }