From 4f1ce6f6aa4d63ca0df7caaf65912b8424f47781 Mon Sep 17 00:00:00 2001 From: Stefan Galinski <stefan@sgalinski.de> Date: Thu, 11 Aug 2022 18:13:29 +0200 Subject: [PATCH] [BUGFIX] Only do the latest language changes for hideNonTranslated modes (strict) --- Classes/Domain/Repository/JobRepository.php | 7 +++++-- ext_localconf.php | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Classes/Domain/Repository/JobRepository.php b/Classes/Domain/Repository/JobRepository.php index 4955e0e9..343a891f 100644 --- a/Classes/Domain/Repository/JobRepository.php +++ b/Classes/Domain/Repository/JobRepository.php @@ -173,9 +173,12 @@ class JobRepository extends Repository { $query = $this->createQuery(); $storagePageIds = $query->getQuerySettings()->getStoragePageIds(); - // we always show all jobs (translated or only created in the specific language) + // we always want to show all jobs if the strict mode is used (translated or + // created in the specific language w/o default) $querySettings = $query->getQuerySettings(); - $querySettings->setLanguageOverlayMode(FALSE); + if ($querySettings->getLanguageOverlayMode() === 'hideNonTranslated') { + $querySettings->setLanguageOverlayMode(FALSE); + } $query->setQuerySettings($querySettings); if (empty($storagePageIds)) { diff --git a/ext_localconf.php b/ext_localconf.php index d4868603..a3747989 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,6 +1,7 @@ <?php defined('TYPO3') or die(); + /*************************************************************** * Copyright notice * @@ -39,7 +40,7 @@ call_user_func( \SGalinski\SgJobs\Controller\JoblistController::class => 'index' ], [ - // Uncacheable actions + // Non-Cache actions \SGalinski\SgJobs\Controller\JoblistController::class => 'index' ] ); @@ -51,7 +52,7 @@ call_user_func( \SGalinski\SgJobs\Controller\JoblistController::class => 'applyForm, apply, empty' ], [ - // Uncacheable actions + // Non-Cache actions \SGalinski\SgJobs\Controller\JoblistController::class => 'applyForm, apply, empty' ] ); @@ -63,7 +64,7 @@ call_user_func( \SGalinski\SgJobs\Controller\JobTeaserController::class => 'index' ], [ - // Uncacheable actions + // Non-Cache actions \SGalinski\SgJobs\Controller\JobTeaserController::class => '' ] ); @@ -90,7 +91,6 @@ call_user_func( // register mail templates $GLOBALS['sg_mail']['sg_jobs']['ApplicationMail'] = 'EXT:sg_jobs/Configuration/SgMail/ApplicationMail.php'; - // Register the upgrade wizard $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgJobs\Updates\DepartmentUpdateWizard::IDENTIFIER] = \SGalinski\SgJobs\Updates\DepartmentUpdateWizard::class; -- GitLab