Skip to content

Commit

Permalink
[BUGFIX] Fix remaining integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bmack authored and dkd-kaehm committed Jul 11, 2024
1 parent 87630a2 commit f859f0c
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,12 @@ protected function processPageRecord(int $uid, int $pid, array $updatedFields =
$this->updateCanonicalPages($uid);
$this->mountPageUpdater->update($uid);

// We need to get the full record to find out if this is a page translation
$fullRecord = BackendUtility::getRecord('pages', $uid);
if ($fullRecord['sys_language_uid'] > 0) {
$uid = (int)$fullRecord['l10n_parent'];
}

$recursiveUpdateRequired = $this->isRecursivePageUpdateRequired($uid, $updatedFields);
if ($recursiveUpdateRequired) {
$treePageIds = $this->getSubPageIds($uid);
Expand Down
1 change: 0 additions & 1 deletion Classes/Domain/Search/Statistics/StatisticsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ public function getFrequentSearchTermsFromStatisticsByFrequentSearchConfiguratio
)
->from($frequentSearchConfiguration['select.']['FROM']);


$queryBuilder
->getConcreteQueryBuilder()
->where($frequentSearchConfiguration['select.']['ADD_WHERE'])
Expand Down
12 changes: 8 additions & 4 deletions Classes/IndexQueue/FrontendHelper/UserGroupDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
/**
* The UserGroupDetector is responsible to identify the fe_group references on records that are visible on the page (not the page itself).
*/
class UserGroupDetector implements FrontendHelper, SingletonInterface {
class UserGroupDetector implements FrontendHelper, SingletonInterface
{
/**
* Index Queue page indexer request.
*/
Expand Down Expand Up @@ -89,7 +90,8 @@ public function checkEnableFields(RecordAccessGrantedEvent $event): void
* restrictions apply during page rendering.
*/
#[AsEventListener]
public function deactivateTcaFrontendGroupEnableFields(ModifyTypoScriptConfigEvent $event): void {
public function deactivateTcaFrontendGroupEnableFields(ModifyTypoScriptConfigEvent $event): void
{
if (!$this->activated) {
return;
}
Expand All @@ -112,7 +114,8 @@ public function deactivateTcaFrontendGroupEnableFields(ModifyTypoScriptConfigEve
* are not performed any longer.
*/
#[AsEventListener]
public function getPage_preProcess(BeforePageIsRetrievedEvent $event): void {
public function getPage_preProcess(BeforePageIsRetrievedEvent $event): void
{
if ($this->activated) {
//$event->skipGroupAccessCheck();
$disableGroupAccessCheck = true;
Expand All @@ -124,7 +127,8 @@ public function getPage_preProcess(BeforePageIsRetrievedEvent $event): void {
* no groups or extendToSubpages flag is found and thus access is granted.
*/
#[AsEventListener]
public function getPageOverlay_preProcess(BeforeRecordLanguageOverlayEvent $event): void {
public function getPageOverlay_preProcess(BeforeRecordLanguageOverlayEvent $event): void
{
if (!$this->activated) {
return;
}
Expand Down
6 changes: 0 additions & 6 deletions Classes/IndexQueue/PageIndexerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@
use Psr\Http\Message\ResponseInterface;
use Psr\Log\LogLevel;
use RuntimeException;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Core\SystemEnvironmentBuilder;
use TYPO3\CMS\Core\Http\MiddlewareDispatcher;
use TYPO3\CMS\Core\Http\RequestFactory;
use TYPO3\CMS\Core\Http\RequestHandler;
use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Core\Utility\GeneralUtility;

/**
Expand Down
1 change: 0 additions & 1 deletion Classes/System/Language/FrontendOverlayService.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Doctrine\DBAL\Exception as DBALException;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Context\Exception\AspectNotFoundException;
use TYPO3\CMS\Core\Context\LanguageAspect;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'versioningWS' => true,
'origUid' => 't3_origuid',
'editlock' => 'editlock',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'versioningWS' => true,
'origUid' => 't3_origuid',
'editlock' => 'editlock',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ CREATE TABLE tx_fakeextension_domain_model_foo (
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
t3_origuid int(11) DEFAULT '0' NOT NULL,
editlock tinyint(4) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
Expand Down Expand Up @@ -47,7 +46,6 @@ CREATE TABLE tx_fakeextension_domain_model_bar (
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
t3_origuid int(11) DEFAULT '0' NOT NULL,
editlock tinyint(4) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'versioningWS' => true,
'origUid' => 't3_origuid',
'editlock' => 'editlock',
'type' => 'type',
'useColumnsForDefaultValues' => 'type',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'versioningWS' => true,
'origUid' => 't3_origuid',
'editlock' => 'editlock',
'type' => 'type',
'useColumnsForDefaultValues' => 'type',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'versioningWS' => true,
'origUid' => 't3_origuid',
'editlock' => 'editlock',
'type' => 'type',
'useColumnsForDefaultValues' => 'type',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"tt_content",
,"uid","pid","header","sys_language_uid","l18n_parent","t3_origuid"
,456,1,"foo",0,0,0
,9999,1,"foo translated",1,456,456
,"uid","pid","header","sys_language_uid","l18n_parent"
,456,1,"foo",0,0
,9999,1,"foo translated",1,456
30 changes: 5 additions & 25 deletions Tests/Integration/IndexQueue/RecordMonitorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,11 @@ class RecordMonitorTest extends IntegrationTestBase
'../vendor/apache-solr-for-typo3/solr/Tests/Integration/Fixtures/Extensions/fake_extension',
];

/**
* @var RecordMonitor
*/
protected $recordMonitor;

/**
* @var DataHandler
*/
protected $dataHandler;

/**
* @var Queue
*/
protected $indexQueue;

/**
* @var ExtensionConfiguration
*/
protected $extensionConfiguration;

/**
* @var EventQueueItemRepository
*/
protected $eventQueue;

protected RecordMonitor $recordMonitor;
protected DataHandler $dataHandler;
protected Queue $indexQueue;
protected ExtensionConfiguration $extensionConfiguration;
protected EventQueueItemRepository $eventQueue;
protected BackendUserAuthentication $backendUser;

protected function setUp(): void
Expand Down
1 change: 0 additions & 1 deletion Tests/Integration/TSFETestBootstrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ApacheSolrForTypo3\Solr\Tests\Integration;

use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\Routing\PageArguments;
use TYPO3\CMS\Core\Site\SiteFinder;
Expand Down

0 comments on commit f859f0c

Please sign in to comment.