Skip to content

Commit 9a286fd

Browse files
committed
2 parents 24df45c + 11a2dcc commit 9a286fd

File tree

9 files changed

+35
-11
lines changed

9 files changed

+35
-11
lines changed

CHANGELOG.md

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

3+
12.5.6:
4+
- [TEST] Adjust PublishChangedContentTest
5+
- [BUGFIX] Fix publishbackgroundall dependency index
6+
- [BUGFIX] Fix DirtyProperties of Redirect
7+
- [BUGFIX] Correct functional of save and publish button
8+
- [TEST] Correct Tests
9+
- [BUGFIX] Implement suggested bugfix for duplicate key exception
10+
311
12.5.5:
412
- [BUGFIX] Correct Response of Compare Tool
513
- [BUGFIX] Make ResolverService public

Classes/Component/Core/DemandResolver/Select/SelectDemandResolver.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ protected function createAndMapRecords(
100100
if (null === $record) {
101101
continue;
102102
}
103-
$recordCollection->addRecord($record);
103+
} else {
104+
$this->recordIndex->addRecord($record);
104105
}
106+
107+
$recordCollection->addRecord($record);
105108
$localMapValue = $record->getLocalProps()[$property] ?? null;
106109
$foreignMapValue = $record->getForeignProps()[$property] ?? null;
107110
$mapValues = array_unique([$localMapValue, $foreignMapValue]);

Classes/Component/Core/Repository/SingleDatabaseRepository.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ public function findByPropertyWithJoin(
148148
$splitRow['mmtbl']['uid_local'],
149149
$splitRow['mmtbl']['uid_foreign'],
150150
];
151+
if(isset($splitRow['mmtbl']['tablenames']))
152+
{
153+
$mmIdentityProperties[] = $splitRow['mmtbl']['tablenames'];
154+
}
155+
if(isset($splitRow['mmtbl']['fieldname']))
156+
{
157+
$mmIdentityProperties[] = $splitRow['mmtbl']['fieldname'];
158+
}
151159
$splitRows[hash('sha1', json_encode($mmIdentityProperties, JSON_THROW_ON_ERROR))] = $splitRow;
152160
}
153161
/*
@@ -230,6 +238,8 @@ public function findMmByProperty(string $table, string $property, array $values)
230238
$mmIdentityProperties = [
231239
$row['uid_local'],
232240
$row['uid_foreign'],
241+
$row['tablenames'] ?? null,
242+
$row['fieldname'] ?? null,
233243
];
234244
$rows[hash('sha1', json_encode($mmIdentityProperties, JSON_THROW_ON_ERROR))] = $row;
235245
}

Classes/Features/RedirectsSupport/Controller/RedirectController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ public function selectSiteAction(int $redirect, array $properties = null): Respo
224224
),
225225
);
226226
if (isset($_POST['_saveandpublish'])) {
227-
$this->redirect('publish', null, null, ['redirects' => [$redirectDto->uid]]);
227+
return $this->redirect('publish', null, null, ['redirects' => [$redirectDto->uid]]);
228228
}
229-
$this->redirect('list');
229+
return $this->redirect('list');
230230
}
231231
$sites = $this->foreignSiteFinder->getAllSites();
232232
$siteOptions = [

Resources/Private/Partials/Redirect/DirtyProperties.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
Line breaks and whitespace is visible where this partial is rendered.
1313
</f:comment>
14-
<f:if condition="{redirect.record.state} == 'changed'"><f:then>
14+
<f:if condition="{redirect.state} == 'changed'"><f:then>
1515
<f:translate key="redirect.record.property" /> | <f:translate key="redirect.record.property.old" /> -> <f:translate key="redirect.record.property.new" />
1616

17-
<f:for each="{redirect.record.dirtyProperties}" as="name">{name} | <publish:Miscellaneous.GetPropertyFromStagingDefinition record="{redirect.record}" propertyName="{name}" stagingLevel="foreign"/> -> <publish:Miscellaneous.GetPropertyFromStagingDefinition record="{redirect.record}" propertyName="{name}" stagingLevel="local"/>
17+
<f:for each="{redirect.changedProps}" as="name">{name} | <publish:Miscellaneous.GetPropertyFromStagingDefinition record="{redirect}" propertyName="{name}" stagingLevel="foreign"/> -> <publish:Miscellaneous.GetPropertyFromStagingDefinition record="{redirect}" propertyName="{name}" stagingLevel="local"/>
1818
</f:for>
1919
</f:then><f:else>
20-
<f:translate key="record.state.{redirect.record.state}" />
20+
<f:translate key="record.state.{redirect.state}" />
2121
</f:else></f:if>
2222
</html>

Tests/Browser/PublishChangedContentTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ public function testChangedPageContentCanBePublished(): void
3434
WebDriverBy::cssSelector('[data-action="opendirtypropertieslistcontainer"]'),
3535
);
3636
$info->click();
37-
self::assertPageContains($driver, '1b.1 Header - changed');
3837
});
3938

39+
// Workaround
40+
sleep($this->sleepTime);
41+
4042
TYPO3Helper::inContentIFrameContext($localDriver, static function (WebDriver $driver): void {
43+
self::assertPageContains($driver, '1b.1 Header - changed');
4144
$driver->click(WebDriverBy::cssSelector('.in2publish-icon-publish'));
4245
});
4346

Tests/Functional/Component/Core/DemandResolver/Join/JoinDemandResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testJoinDemandResolverResolvesMmRelation(): void
3737
$sysCategoryParents = $sysCategoryRecord->getParents();
3838
self::assertCount(1, $sysCategoryParents);
3939
$sysCategoryMmRecord = reset($sysCategoryParents);
40-
self::assertSame('7f64dfb449435fd9951d63ff8885d639b2cbe3bf', $sysCategoryMmRecord->getId());
40+
self::assertSame('1e829e4ee2bd6fa3a73ee64c6461313b08939ee7', $sysCategoryMmRecord->getId());
4141
$mmParents = $sysCategoryMmRecord->getParents();
4242
self::assertCount(1, $mmParents);
4343
$mmParent = reset($mmParents);

Tests/Functional/Component/Core/Repository/SingleDatabaseRepositoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testFindByPropertyWithJoinReturnsJoinedRows(): void
4646
[170, 180],
4747
);
4848
self::assertSame([
49-
'7f64dfb449435fd9951d63ff8885d639b2cbe3bf' => [
49+
'1e829e4ee2bd6fa3a73ee64c6461313b08939ee7' => [
5050
'mmtbl' => [
5151
'uid_local' => 1,
5252
'uid_foreign' => 170,
@@ -91,7 +91,7 @@ public function testFindByPropertyWithJoinReturnsJoinedRows(): void
9191
'slug' => "styleguide-demo-category",
9292
],
9393
],
94-
'1a96d1af72a6c1f3208d78a4f66a4e9b9bcf4198' => [
94+
'427137b54c066f401f490c1af0aea53e5ed70536' => [
9595
'mmtbl' => [
9696
'uid_local' => 1,
9797
'uid_foreign' => 180,

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

0 commit comments

Comments
 (0)