Skip to content

Commit 24df45c

Browse files
committed
[RELEASE] Version 12.5.5 Fixes & Improvements
Releases: https://projekte.in2code.de/issues/67020 Releases: https://projekte.in2code.de/issues/67141
2 parents 39748c5 + b44a095 commit 24df45c

File tree

7 files changed

+89
-23
lines changed

7 files changed

+89
-23
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# In2publish Core Change Log
22

3-
15.5.4:
3+
12.5.5:
4+
- [BUGFIX] Correct Response of Compare Tool
5+
- [BUGFIX] Make ResolverService public
6+
- [BUGFIX] Fix cache clear task
7+
- [BUGFIX] Fix filters in file module
8+
- [TASK] Make search in file module case-insensitive
9+
10+
12.5.4:
411
- [BUGFIX] Enable Logging in Command on foreign
512
- [BUGFIX] LogLevel is evaluated correctly
613

Classes/Features/CacheInvalidation/Domain/Model/Task/FlushFrontendPageCacheTask.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,13 @@ protected function getDataHandler(): DataHandler
6868
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);
6969
/** @var CommandLineUserAuthentication $user */
7070
$user = $GLOBALS['BE_USER'];
71-
$user->authenticate();
71+
72+
if (!$user->user) {
73+
$user->authenticate();
74+
}
75+
7276
$dataHandler->BE_USER = $user;
77+
7378
/** @psalm-suppress InternalProperty */
7479
$dataHandler->admin = true;
7580
return $dataHandler;

Classes/Features/CompareDatabaseTool/Controller/CompareDatabaseToolController.php

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function compareAction(ComparisonRequest $comparisonRequest = null): Resp
180180
* @SuppressWarnings(PHPMD.NPathComplexity) PR welcome
181181
* @SuppressWarnings(PHPMD.ExcessiveMethodLength) PR welcome
182182
*/
183-
public function transferAction(string $table, int $uid, string $expected): void
183+
public function transferAction(string $table, int $uid, string $expected): ResponseInterface
184184
{
185185
$localQuery = $this->localDatabase->createQueryBuilder();
186186
$localQuery->getRestrictions()->removeAll();
@@ -202,8 +202,14 @@ public function transferAction(string $table, int $uid, string $expected): void
202202

203203
if (empty($localRow) && empty($foreignRow)) {
204204
$this->addFlashMessage(
205-
LocalizationUtility::translate('compare_database.transfer.record_missing', 'in2publish_core'),
206-
LocalizationUtility::translate('compare_database.transfer.error', 'in2publish_core'),
205+
LocalizationUtility::translate(
206+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.record_missing',
207+
'in2publish_core'
208+
),
209+
LocalizationUtility::translate(
210+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.error',
211+
'in2publish_core'
212+
),
207213
AbstractMessage::ERROR,
208214
);
209215
$this->redirect('index');
@@ -212,8 +218,14 @@ public function transferAction(string $table, int $uid, string $expected): void
212218
if ($expected === 'only_foreign') {
213219
if (!(empty($localRow) && !empty($foreignRow))) {
214220
$this->addFlashMessage(
215-
LocalizationUtility::translate('compare_database.transfer.exists_on_foreign', 'in2publish_core'),
216-
LocalizationUtility::translate('compare_database.transfer.error', 'in2publish_core'),
221+
LocalizationUtility::translate(
222+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.exists_on_foreign',
223+
'in2publish_core'
224+
),
225+
LocalizationUtility::translate(
226+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.error',
227+
'in2publish_core'
228+
),
217229
AbstractMessage::ERROR,
218230
);
219231
$this->redirect('index');
@@ -225,20 +237,29 @@ public function transferAction(string $table, int $uid, string $expected): void
225237
if (1 === $foreignResult) {
226238
$this->addFlashMessage(
227239
LocalizationUtility::translate(
228-
'compare_database.transfer.deleted_from_foreign',
240+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.deleted_from_foreign',
229241
'in2publish_core',
230242
[$table, $uid],
231243
),
232-
LocalizationUtility::translate('compare_database.transfer.success', 'in2publish_core'),
244+
LocalizationUtility::translate(
245+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.success',
246+
'in2publish_core'
247+
),
233248
);
234249
}
235250
}
236251

237252
if ($expected === 'only_local') {
238253
if (!(!empty($localRow) && empty($foreignRow))) {
239254
$this->addFlashMessage(
240-
LocalizationUtility::translate('compare_database.transfer.exists_on_local', 'in2publish_core'),
241-
LocalizationUtility::translate('compare_database.transfer.error', 'in2publish_core'),
255+
LocalizationUtility::translate(
256+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.exists_on_local',
257+
'in2publish_core'
258+
),
259+
LocalizationUtility::translate(
260+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.error',
261+
'in2publish_core'
262+
),
242263
AbstractMessage::ERROR,
243264
);
244265
$this->redirect('index');
@@ -250,11 +271,14 @@ public function transferAction(string $table, int $uid, string $expected): void
250271
if (1 === $foreignResult) {
251272
$this->addFlashMessage(
252273
LocalizationUtility::translate(
253-
'compare_database.transfer.transferred_to_foreign',
274+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.transferred_to_foreign',
254275
'in2publish_core',
255276
[$table, $uid],
256277
),
257-
LocalizationUtility::translate('compare_database.transfer.success', 'in2publish_core'),
278+
LocalizationUtility::translate(
279+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.success',
280+
'in2publish_core'
281+
),
258282
);
259283
}
260284
}
@@ -263,10 +287,13 @@ public function transferAction(string $table, int $uid, string $expected): void
263287
if (!(!empty($localRow) && !empty($foreignRow))) {
264288
$this->addFlashMessage(
265289
LocalizationUtility::translate(
266-
'compare_database.transfer.does_not_exists_on_both',
290+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.does_not_exists_on_both',
267291
'in2publish_core',
268292
),
269-
LocalizationUtility::translate('compare_database.transfer.error', 'in2publish_core'),
293+
LocalizationUtility::translate(
294+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.error',
295+
'in2publish_core'
296+
),
270297
AbstractMessage::ERROR,
271298
);
272299
$this->redirect('index');
@@ -283,16 +310,19 @@ public function transferAction(string $table, int $uid, string $expected): void
283310
if (1 === $foreignResult) {
284311
$this->addFlashMessage(
285312
LocalizationUtility::translate(
286-
'compare_database.transfer.updated_on_foreign',
313+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.updated_on_foreign',
287314
'in2publish_core',
288315
[$table, $uid],
289316
),
290-
LocalizationUtility::translate('compare_database.transfer.success', 'in2publish_core'),
317+
LocalizationUtility::translate(
318+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang_mod4.xlf:compare_database.transfer.success',
319+
'in2publish_core'
320+
),
291321
);
292322
}
293323
}
294324

295-
$this->redirect('index');
325+
return $this->redirect('index');
296326
}
297327

298328
protected function getAllNonExcludedTables(): array

Classes/Features/FileEdgeCacheInvalidator/Domain/Service/FileEdgeCacheInvalidationService.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
use Doctrine\DBAL\Result;
3333
use In2code\In2publishCore\CommonInjection\LocalDatabaseInjection;
34+
use TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication;
3435
use TYPO3\CMS\Core\DataHandling\DataHandler;
3536
use TYPO3\CMS\Core\Utility\GeneralUtility;
3637

@@ -142,11 +143,29 @@ protected function resolveRecordsToPages(RecordCollection $recordCollection): vo
142143

143144
protected function clearCachesForPages(RecordCollection $recordCollection): void
144145
{
145-
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);
146+
$dataHandler = $this->getDataHandler();
146147
$dataHandler->start([], []);
147148
$pages = $recordCollection->getPages();
148149
foreach ($pages as $page) {
149150
$dataHandler->clear_cacheCmd($page);
150151
}
151152
}
153+
154+
protected function getDataHandler(): DataHandler
155+
{
156+
/** @var DataHandler $dataHandler */
157+
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);
158+
/** @var CommandLineUserAuthentication $user */
159+
$user = $GLOBALS['BE_USER'];
160+
161+
if (!$user->user) {
162+
$user->authenticate();
163+
}
164+
165+
$dataHandler->BE_USER = $user;
166+
167+
/** @psalm-suppress InternalProperty */
168+
$dataHandler->admin = true;
169+
return $dataHandler;
170+
}
152171
}

Configuration/Component/Core/Services.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ services:
4545
In2code\In2publishCore\Component\Core\Publisher\PublisherService:
4646
public: true
4747
shared: true
48+
49+
In2code\In2publishCore\Component\Core\Service\ResolverService:
50+
public: true

Resources/Public/JavaScript/BackendModule.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ define([
99
'TYPO3/CMS/In2publishCore/ConfirmationModal',
1010
], function ($, DebounceEvent, Modal, LoadingOverlay, ConfirmationModal) {
1111
var In2publishCoreModule = {
12-
isPublishFilesModule: (document.querySelector('.module[data-module-name="file_In2publishCoreM3"]') !== null),
12+
isPublishFilesModule: (document.querySelector('.module[data-module-name="in2publish_core_m3"]') !== null)
13+
// TYPO3 v11
14+
|| (document.querySelector('.module[data-module-name="file_In2publishCoreM3"]') !== null),
1315
unchangedFilter: false,
1416
changedFilter: false,
1517
addedFilter: false,
@@ -167,12 +169,12 @@ define([
167169
const searchForm = document.querySelector('.js-form-search');
168170
if (searchForm) {
169171
new DebounceEvent('input', function (event) {
170-
const searchValue = event.target.value;
172+
const searchValue = event.target.value.toLowerCase();
171173
const elements = document.querySelectorAll('.in2publish-stagelisting__item');
172174

173175
(Array.from(elements)).forEach(function (item) {
174176
if (searchValue !== '') {
175-
const searchable = item.getAttribute('data-searchable');
177+
const searchable = item.getAttribute('data-searchable').toLowerCase();
176178

177179
if (!searchable.includes(searchValue)) {
178180
item.classList.add('d-none');

ext_emconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'title' => 'in2publish Core',
1010
'description' => 'Content publishing extension to connect stage and production server',
1111
'category' => 'plugin',
12-
'version' => '12.5.4',
12+
'version' => '12.5.5',
1313
'state' => 'stable',
1414
'clearCacheOnLoad' => true,
1515
'author' => 'Alex Kellner, Oliver Eglseder, Thomas Scheibitz, Stefan Busemann',

0 commit comments

Comments
 (0)