Skip to content

Commit

Permalink
[RELEASE] Version 12.5.6 Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tinzog committed Nov 7, 2024
2 parents 24df45c + 11a2dcc commit 9a286fd
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# In2publish Core Change Log

12.5.6:
- [TEST] Adjust PublishChangedContentTest
- [BUGFIX] Fix publishbackgroundall dependency index
- [BUGFIX] Fix DirtyProperties of Redirect
- [BUGFIX] Correct functional of save and publish button
- [TEST] Correct Tests
- [BUGFIX] Implement suggested bugfix for duplicate key exception

12.5.5:
- [BUGFIX] Correct Response of Compare Tool
- [BUGFIX] Make ResolverService public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ protected function createAndMapRecords(
if (null === $record) {
continue;
}
$recordCollection->addRecord($record);
} else {
$this->recordIndex->addRecord($record);
}

$recordCollection->addRecord($record);
$localMapValue = $record->getLocalProps()[$property] ?? null;
$foreignMapValue = $record->getForeignProps()[$property] ?? null;
$mapValues = array_unique([$localMapValue, $foreignMapValue]);
Expand Down
10 changes: 10 additions & 0 deletions Classes/Component/Core/Repository/SingleDatabaseRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ public function findByPropertyWithJoin(
$splitRow['mmtbl']['uid_local'],
$splitRow['mmtbl']['uid_foreign'],
];
if(isset($splitRow['mmtbl']['tablenames']))
{
$mmIdentityProperties[] = $splitRow['mmtbl']['tablenames'];
}
if(isset($splitRow['mmtbl']['fieldname']))
{
$mmIdentityProperties[] = $splitRow['mmtbl']['fieldname'];
}
$splitRows[hash('sha1', json_encode($mmIdentityProperties, JSON_THROW_ON_ERROR))] = $splitRow;
}
/*
Expand Down Expand Up @@ -230,6 +238,8 @@ public function findMmByProperty(string $table, string $property, array $values)
$mmIdentityProperties = [
$row['uid_local'],
$row['uid_foreign'],
$row['tablenames'] ?? null,
$row['fieldname'] ?? null,
];
$rows[hash('sha1', json_encode($mmIdentityProperties, JSON_THROW_ON_ERROR))] = $row;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ public function selectSiteAction(int $redirect, array $properties = null): Respo
),
);
if (isset($_POST['_saveandpublish'])) {
$this->redirect('publish', null, null, ['redirects' => [$redirectDto->uid]]);
return $this->redirect('publish', null, null, ['redirects' => [$redirectDto->uid]]);
}
$this->redirect('list');
return $this->redirect('list');
}
$sites = $this->foreignSiteFinder->getAllSites();
$siteOptions = [
Expand Down
6 changes: 3 additions & 3 deletions Resources/Private/Partials/Redirect/DirtyProperties.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

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

<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"/>
<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"/>
</f:for>
</f:then><f:else>
<f:translate key="record.state.{redirect.record.state}" />
<f:translate key="record.state.{redirect.state}" />
</f:else></f:if>
</html>
5 changes: 4 additions & 1 deletion Tests/Browser/PublishChangedContentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ public function testChangedPageContentCanBePublished(): void
WebDriverBy::cssSelector('[data-action="opendirtypropertieslistcontainer"]'),
);
$info->click();
self::assertPageContains($driver, '1b.1 Header - changed');
});

// Workaround
sleep($this->sleepTime);

TYPO3Helper::inContentIFrameContext($localDriver, static function (WebDriver $driver): void {
self::assertPageContains($driver, '1b.1 Header - changed');
$driver->click(WebDriverBy::cssSelector('.in2publish-icon-publish'));
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testJoinDemandResolverResolvesMmRelation(): void
$sysCategoryParents = $sysCategoryRecord->getParents();
self::assertCount(1, $sysCategoryParents);
$sysCategoryMmRecord = reset($sysCategoryParents);
self::assertSame('7f64dfb449435fd9951d63ff8885d639b2cbe3bf', $sysCategoryMmRecord->getId());
self::assertSame('1e829e4ee2bd6fa3a73ee64c6461313b08939ee7', $sysCategoryMmRecord->getId());
$mmParents = $sysCategoryMmRecord->getParents();
self::assertCount(1, $mmParents);
$mmParent = reset($mmParents);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testFindByPropertyWithJoinReturnsJoinedRows(): void
[170, 180],
);
self::assertSame([
'7f64dfb449435fd9951d63ff8885d639b2cbe3bf' => [
'1e829e4ee2bd6fa3a73ee64c6461313b08939ee7' => [
'mmtbl' => [
'uid_local' => 1,
'uid_foreign' => 170,
Expand Down Expand Up @@ -91,7 +91,7 @@ public function testFindByPropertyWithJoinReturnsJoinedRows(): void
'slug' => "styleguide-demo-category",
],
],
'1a96d1af72a6c1f3208d78a4f66a4e9b9bcf4198' => [
'427137b54c066f401f490c1af0aea53e5ed70536' => [
'mmtbl' => [
'uid_local' => 1,
'uid_foreign' => 180,
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'title' => 'in2publish Core',
'description' => 'Content publishing extension to connect stage and production server',
'category' => 'plugin',
'version' => '12.5.5',
'version' => '12.5.6',
'state' => 'stable',
'clearCacheOnLoad' => true,
'author' => 'Alex Kellner, Oliver Eglseder, Thomas Scheibitz, Stefan Busemann',
Expand Down

0 comments on commit 9a286fd

Please sign in to comment.