Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect hidden records in routing #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Classes/ConfigurationModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Utility\GeneralUtility;

class ConfigurationModifier
Expand Down Expand Up @@ -73,6 +74,7 @@ protected static function findDynamicPages(array $dynamicPagesConfiguration): ar
protected static function findPagesWithPlugins(array $withPlugins): array
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$contentElementRecords = $queryBuilder
->select('pid')
->from('tt_content')
Expand All @@ -88,6 +90,7 @@ protected static function findPagesWithPlugins(array $withPlugins): array
protected static function findPagesWithSwitchableControllerActions(array $withSwitchableControllerActions): array
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$constraints = [];
foreach ($withSwitchableControllerActions as $withSwitchableControllerAction) {
$constraints[] = $queryBuilder->expr()->like('pi_flexform', $queryBuilder->createNamedParameter('%>' . htmlentities($withSwitchableControllerAction) . '<%', \PDO::PARAM_STR));
Expand All @@ -104,6 +107,7 @@ protected static function findPagesWithSwitchableControllerActions(array $withSw
protected static function findPagesContainingModules(array $modules): array
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$pageRecords = $queryBuilder
->select('uid')
->from('pages')
Expand All @@ -119,6 +123,7 @@ protected static function findPagesWithDoktypes(array $doktypes): array
{
$doktypes = array_map('intval', $doktypes);
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$pageRecords = $queryBuilder
->select('uid')
->from('pages')
Expand All @@ -136,6 +141,7 @@ protected static function findPagesWithDoktypes(array $doktypes): array
protected static function findPagesWithCType(array $withCType): array
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$contentElementRecords = $queryBuilder
->select('pid')
->from('tt_content')
Expand Down