Skip to content

Commit 1f46984

Browse files
committed
[RELEASE] Version 11.0.1 with minor bug fixes
2 parents 36e4655 + 06f9927 commit 1f46984

File tree

10 files changed

+73
-24
lines changed

10 files changed

+73
-24
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# In2publish Core Change Log
22

3+
11.0.1:
4+
5+
- [META] Set the EM conf version number to 11.0.1
6+
- [DOCS] Update changelog
7+
- [META] Set the EM conf version number to 10.2.2
8+
- [BUGFIX] Show the actual key for differences in site configs
9+
- [BUGFIX] Check the actual delete field of a table to determine if the record is deleted
10+
- [BUGFIX] Prevent access on undefined array key
11+
- [CLEANUP] Strip a superfluous function import as alias
12+
- [BUGFIX] Actually use the value formatted by its TCA eval field
13+
- [BUGFIX] Include array key existence check when looking for group/db MM tables
14+
- [BUGFIX] Format arrays as strings before comparing them with array_diff
15+
- [BUGFIX] Fix array key for registered tool actions
16+
- [BUGFIX] Check if deprecated config values are set before evaluation
17+
- [TYPO] Fix message when there are no envelopes to flush
18+
- [RELEASE] Version 11.0.0 with TYPO3 v11 compatibility
19+
320
11.0.0:
421

522
- [META] Set the branch alias version number to 11.0.x-dev
@@ -102,6 +119,18 @@
102119
- [CLEANUP] Remove outdated compatibility class SignalSlotReplacement
103120
- [!!!][UPDATE] Require TYPO3 v11
104121

122+
10.2.2:
123+
124+
- [META] Set the EM conf version number to 10.2.2
125+
- [BUGFIX] Show the actual key for differences in site configs
126+
- [BUGFIX] Check the actual delete field of a table to determine if the record is deleted
127+
- [BUGFIX] Prevent access on undefined array key
128+
- [BUGFIX] Include array key existence check when looking for group/db MM tables
129+
- [BUGFIX] Format arrays as strings before comparing them with array_diff
130+
- [BUGFIX] Check if deprecated config values are set before evaluation
131+
- [TYPO] Fix message when there are no envelopes to flush
132+
- [RELEASE] Version 10.2.1 with a lot of bugfixes
133+
105134
10.2.1:
106135

107136
- [META] Set the EM conf version number to 10.2.1

Classes/Component/RecordHandling/DefaultRecordFinder.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ protected function fetchRelatedRecordsByGroupTypeDb(
12121212
if (in_array($tableName, $excludedTableNames, true)) {
12131213
return $records;
12141214
}
1215-
if ($columnConfiguration['MM']) {
1215+
if (!empty($columnConfiguration['MM'])) {
12161216
// skip if this record is not the owning side of the relation
12171217
if (!empty($columnConfiguration['MM_oppositeUsage'])) {
12181218
return $records;
@@ -1804,7 +1804,7 @@ protected function fetchOriginalRecordsForInlineRecord(
18041804
*/
18051805
protected function isIgnoredRecord(array $localProperties, array $foreignProperties, string $tableName): bool
18061806
{
1807-
if ($this->isDeletedAndUnchangedRecord($localProperties, $foreignProperties)) {
1807+
if ($this->isDeletedAndUnchangedRecord($localProperties, $foreignProperties, $tableName)) {
18081808
return true;
18091809
}
18101810

@@ -1851,12 +1851,20 @@ protected function isRemovedAndDeletedRecord(array $localProps, array $foreignPr
18511851
*
18521852
* @param array $localProperties
18531853
* @param array $foreignProperties
1854+
* @param string $tableName
18541855
*
18551856
* @return bool
18561857
*/
1857-
protected function isDeletedAndUnchangedRecord(array $localProperties, array $foreignProperties): bool
1858-
{
1859-
return $localProperties['deleted'] === '1' && !count(array_diff($localProperties, $foreignProperties));
1858+
protected function isDeletedAndUnchangedRecord(
1859+
array $localProperties,
1860+
array $foreignProperties,
1861+
string $tableName
1862+
): bool {
1863+
$deleteField = $GLOBALS['TCA'][$tableName]['ctrl']['delete'] ?? null;
1864+
return null !== $deleteField
1865+
&& array_key_exists($deleteField, $localProperties)
1866+
&& $localProperties[$deleteField]
1867+
&& !count(array_diff($localProperties, $foreignProperties));
18601868
}
18611869

18621870
/**

Classes/Features/AdminTools/Service/ToolsRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getEntries(): array
8484
if ($this->evaluateCondition($config)) {
8585
$controller = $config['controller'];
8686
$processedTools[$key] = $config;
87-
$actions = GeneralUtility::trimExplode(',', $processedTools[$key]['actions']);
87+
$actions = GeneralUtility::trimExplode(',', $processedTools[$key]['action']);
8888
$processedTools[$key]['initialAction'] = $actions[0];
8989
if (isset($controllerConfig[$controller]['alias'])) {
9090
$processedTools[$key]['alias'] = $controllerConfig[$controller]['alias'];

Classes/Features/SimplifiedOverviewAndPublishing/Config/Migration/SimplifiedOverviewAndPublishingMigration.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,17 @@ class SimplifiedOverviewAndPublishingMigration extends AbstractMigration
4343
public function migrate(array $config): array
4444
{
4545
$enable = false;
46-
if ($config['factory']['simpleOverviewAndAjax']) {
46+
if (
47+
isset($config['factory']['simpleOverviewAndAjax'])
48+
&& $config['factory']['simpleOverviewAndAjax']
49+
) {
4750
$this->addMessage(sprintf(self::MESSAGE, 'factory.simpleOverviewAndAjax'));
4851
$enable = true;
4952
}
50-
if ($config['features']['simplePublishing']['enable']) {
53+
if (
54+
isset($config['features']['simplePublishing']['enable'])
55+
&& $config['features']['simplePublishing']['enable']
56+
) {
5157
$this->addMessage(sprintf(self::MESSAGE, 'features.simplePublishing.enable'));
5258
$enable = true;
5359
}

Classes/Testing/Tests/Application/SiteConfigurationTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use function array_keys;
4343
use function array_merge;
4444
use function array_unique;
45+
use function json_encode;
4546
use function sprintf;
4647

4748
class SiteConfigurationTest implements TestCaseInterface
@@ -107,7 +108,7 @@ public function run(): TestResult
107108
'direction' => $localLanguage->getDirection(),
108109
'typo3Language' => $localLanguage->getTypo3Language(),
109110
'fallbackType' => $localLanguage->getFallbackType(),
110-
'fallbackLanguageIds' => $localLanguage->getFallbackLanguageIds(),
111+
'fallbackLanguageIds' => json_encode($localLanguage->getFallbackLanguageIds()),
111112
'enabled' => $localLanguage->isEnabled(),
112113
];
113114

@@ -120,15 +121,16 @@ public function run(): TestResult
120121
'direction' => $foreignLanguage->getDirection(),
121122
'typo3Language' => $foreignLanguage->getTypo3Language(),
122123
'fallbackType' => $foreignLanguage->getFallbackType(),
123-
'fallbackLanguageIds' => $foreignLanguage->getFallbackLanguageIds(),
124+
'fallbackLanguageIds' => json_encode($foreignLanguage->getFallbackLanguageIds()),
124125
'enabled' => $foreignLanguage->isEnabled(),
125126
];
126127

127128
$differences = array_keys(array_diff($localLanguageArray, $foreignLanguageArray));
128129
foreach ($differences as $difference) {
129130
$siteErrors[] = sprintf(
130-
'Site %s differences: %s <> %s',
131+
'Site %s differences in %s: %s <> %s',
131132
$siteIdentifier,
133+
$difference,
132134
$localLanguageArray[$difference],
133135
$foreignLanguageArray[$difference]
134136
);

Classes/Utility/UriUtility.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ public static function normalizeUri(UriInterface $uri): UriInterface
4040
}
4141
if (empty($uri->getHost())) {
4242
$path = $uri->getPath();
43-
[$host, $path] = explode('/', $path, 2);
44-
if (empty($path)) {
45-
$path = '';
46-
}
43+
$parts = explode('/', $path, 2);
44+
$host = $parts[0];
45+
$path = $parts[1] ?? '';
4746
$uri = $uri->withHost($host)->withPath($path);
4847
}
4948
return $uri;

Classes/ViewHelpers/Tca/FormatPropertyByTcaDefinitionViewHelper.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
use TYPO3\CMS\Core\Utility\GeneralUtility;
3232
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
3333

34-
use function nl2br as nl2br1;
34+
use function nl2br;
3535
use function strftime;
3636
use function trim;
3737

@@ -63,10 +63,10 @@ public function render(): string
6363

6464
switch ($this->tableConfiguration['config']['type']) {
6565
case 'input':
66-
$this->changeValueForTypeInput($value);
66+
$value = $this->changeValueForTypeInput($value);
6767
break;
6868
case 'text':
69-
$value = nl2br1($value);
69+
$value = nl2br($value);
7070
break;
7171
default:
7272
}
@@ -80,12 +80,17 @@ public function render(): string
8080

8181
protected function changeValueForTypeInput(string $value): string
8282
{
83-
if (GeneralUtility::inList($this->tableConfiguration['config']['eval'], 'password')) {
83+
$eval = $this->tableConfiguration['config']['eval'] ?? null;
84+
if (null === $eval) {
85+
return $value;
86+
}
87+
88+
if (GeneralUtility::inList($eval, 'password')) {
8489
return '*******';
8590
}
8691
if (
87-
GeneralUtility::inList($this->tableConfiguration['config']['eval'], 'datetime')
88-
|| GeneralUtility::inList($this->tableConfiguration['config']['eval'], 'date')
92+
GeneralUtility::inList($eval, 'datetime')
93+
|| GeneralUtility::inList($eval, 'date')
8994
) {
9095
if ($value !== '0') {
9196
$value = strftime('%d.%m.%Y', (int)$value);

Resources/Private/Language/de.locallang.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
<target state="translated">Überflüssigen Envelopes löschen.</target>
396396
</trans-unit>
397397
<trans-unit id="module.m4.nothing_to_flush">
398-
<source>There are not envelopes to flush.</source>
398+
<source>There are no envelopes to flush.</source>
399399
<target state="translated">Es gibt keine Envelopes zum löschen.</target>
400400
</trans-unit>
401401
<trans-unit id="module.m4.flush_registry">

Resources/Private/Language/locallang.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
<source>Flush superfluous envelopes.</source>
300300
</trans-unit>
301301
<trans-unit id="module.m4.nothing_to_flush">
302-
<source>There are not envelopes to flush.</source>
302+
<source>There are no envelopes to flush.</source>
303303
</trans-unit>
304304
<trans-unit id="module.m4.flush_registry">
305305
<source>Clear registry entries.</source>

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' => '11.0.0',
12+
'version' => '11.0.1',
1313
'state' => 'stable',
1414
'clearCacheOnLoad' => true,
1515
'author' => 'Alex Kellner, Oliver Eglseder, Thomas Scheibitz, Stefan Busemann',

0 commit comments

Comments
 (0)