Skip to content

Commit 1aa5b93

Browse files
committed
[RELEASE] Version 10.2.2 with minor bug fixes
2 parents a786f49 + 73c4ebb commit 1aa5b93

File tree

9 files changed

+52
-20
lines changed

9 files changed

+52
-20
lines changed

CHANGELOG.md

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

3+
10.2.2:
4+
5+
- [META] Set the EM conf version number to 10.2.2
6+
- [BUGFIX] Show the actual key for differences in site configs
7+
- [BUGFIX] Check the actual delete field of a table to determine if the record is deleted
8+
- [BUGFIX] Prevent access on undefined array key
9+
- [BUGFIX] Include array key existence check when looking for group/db MM tables
10+
- [BUGFIX] Format arrays as strings before comparing them with array_diff
11+
- [BUGFIX] Check if deprecated config values are set before evaluation
12+
- [TYPO] Fix message when there are no envelopes to flush
13+
- [RELEASE] Version 10.2.1 with a lot of bugfixes
14+
315
10.2.1:
416

517
- [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
@@ -1201,7 +1201,7 @@ protected function fetchRelatedRecordsByGroupTypeDb(
12011201
if (in_array($tableName, $excludedTableNames)) {
12021202
return $records;
12031203
}
1204-
if ($columnConfiguration['MM']) {
1204+
if (!empty($columnConfiguration['MM'])) {
12051205
// skip if this record is not the owning side of the relation
12061206
if (!empty($columnConfiguration['MM_oppositeUsage'])) {
12071207
return $records;
@@ -1797,7 +1797,7 @@ protected function fetchOriginalRecordsForInlineRecord(
17971797
*/
17981798
protected function isIgnoredRecord(array $localProperties, array $foreignProperties, string $tableName): bool
17991799
{
1800-
if ($this->isDeletedAndUnchangedRecord($localProperties, $foreignProperties)) {
1800+
if ($this->isDeletedAndUnchangedRecord($localProperties, $foreignProperties, $tableName)) {
18011801
return true;
18021802
}
18031803

@@ -1844,12 +1844,20 @@ protected function isRemovedAndDeletedRecord(array $localProps, array $foreignPr
18441844
*
18451845
* @param array $localProperties
18461846
* @param array $foreignProperties
1847+
* @param string $tableName
18471848
*
18481849
* @return bool
18491850
*/
1850-
protected function isDeletedAndUnchangedRecord(array $localProperties, array $foreignProperties): bool
1851-
{
1852-
return $localProperties['deleted'] === '1' && !count(array_diff($localProperties, $foreignProperties));
1851+
protected function isDeletedAndUnchangedRecord(
1852+
array $localProperties,
1853+
array $foreignProperties,
1854+
string $tableName
1855+
): bool {
1856+
$deleteField = $GLOBALS['TCA'][$tableName]['ctrl']['delete'] ?? null;
1857+
return null !== $deleteField
1858+
&& array_key_exists($deleteField, $localProperties)
1859+
&& $localProperties[$deleteField]
1860+
&& !count(array_diff($localProperties, $foreignProperties));
18531861
}
18541862

18551863
/**

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
@@ -110,7 +111,7 @@ public function run(): TestResult
110111
'direction' => $localLanguage->getDirection(),
111112
'typo3Language' => $localLanguage->getTypo3Language(),
112113
'fallbackType' => $localLanguage->getFallbackType(),
113-
'fallbackLanguageIds' => $localLanguage->getFallbackLanguageIds(),
114+
'fallbackLanguageIds' => json_encode($localLanguage->getFallbackLanguageIds()),
114115
'enabled' => $localLanguage->isEnabled(),
115116
];
116117

@@ -123,15 +124,16 @@ public function run(): TestResult
123124
'direction' => $foreignLanguage->getDirection(),
124125
'typo3Language' => $foreignLanguage->getTypo3Language(),
125126
'fallbackType' => $foreignLanguage->getFallbackType(),
126-
'fallbackLanguageIds' => $foreignLanguage->getFallbackLanguageIds(),
127+
'fallbackLanguageIds' => json_encode($foreignLanguage->getFallbackLanguageIds()),
127128
'enabled' => $foreignLanguage->isEnabled(),
128129
];
129130

130131
$differences = array_keys(array_diff($localLanguageArray, $foreignLanguageArray));
131132
foreach ($differences as $difference) {
132133
$siteErrors[] = sprintf(
133-
'Site %s differences: %s <> %s',
134+
'Site %s differences in %s: %s <> %s',
134135
$siteIdentifier,
136+
$difference,
135137
$localLanguageArray[$difference],
136138
$foreignLanguageArray[$difference]
137139
);

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: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,20 @@ public function render(): string
7979

8080
protected function changeValueForTypeInput(&$value): void
8181
{
82+
$eval = $this->tableConfiguration['config']['eval'] ?? null;
83+
if (null === $eval) {
84+
return;
85+
}
86+
8287
if (
83-
GeneralUtility::inList($this->tableConfiguration['config']['eval'], 'datetime')
84-
|| GeneralUtility::inList($this->tableConfiguration['config']['eval'], 'date')
88+
GeneralUtility::inList($eval, 'datetime')
89+
|| GeneralUtility::inList($eval, 'date')
8590
) {
8691
if ($value !== '0') {
8792
$value = strftime('%d.%m.%Y', (int)$value);
8893
}
8994
}
90-
if (GeneralUtility::inList($this->tableConfiguration['config']['eval'], 'password')) {
95+
if (GeneralUtility::inList($eval, 'password')) {
9196
$value = '*******';
9297
}
9398
}

Resources/Private/Language/de.locallang.xlf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
<target state="translated">Überflüssigen Envelopes löschen.</target>
351351
</trans-unit>
352352
<trans-unit id="module.m4.nothing_to_flush">
353-
<source>There are not envelopes to flush.</source>
353+
<source>There are no envelopes to flush.</source>
354354
<target state="translated">Es gibt keine Envelopes zum löschen.</target>
355355
</trans-unit>
356356
<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
@@ -265,7 +265,7 @@
265265
<source>Flush superfluous envelopes.</source>
266266
</trans-unit>
267267
<trans-unit id="module.m4.nothing_to_flush">
268-
<source>There are not envelopes to flush.</source>
268+
<source>There are no envelopes to flush.</source>
269269
</trans-unit>
270270
<trans-unit id="module.m4.flush_registry">
271271
<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' => '10.2.1',
12+
'version' => '10.2.2',
1313
'state' => 'stable',
1414
'uploadfolder' => 0,
1515
'createDirs' => '',

0 commit comments

Comments
 (0)