Skip to content

Commit

Permalink
[RELEASE] Version 12.5.2 with fixes for 503 errors in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoffmann1979 committed May 28, 2024
2 parents 2f35546 + 9c10cd4 commit 9b1829b
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 23 deletions.
41 changes: 21 additions & 20 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# .gitattributes

/.github export-ignore
/.project export-ignore
/Build export-ignore
.gitkeep export-ignore
/.editorconfig export-ignore
/.env export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.phpstorm.meta.php export-ignore
/.eslintrc export-ignore
/.travis.yml export-ignore
/Resources/Private/Sass export-ignore
/Resources/Private/config.rb export-ignore
/Resources/Private/Clickdummy export-ignore
/Tests export-ignore
/Makefile export-ignore
/phive.xml export-ignore
/phpunit.browser.xml export-ignore
/phpunit.functional.xml export-ignore
/phpunit.unit.xml export-ignore
/.github export-ignore
/.project export-ignore
/Build export-ignore
.gitkeep export-ignore
/.editorconfig export-ignore
/.env export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.phpstorm.meta.php export-ignore
/.eslintrc export-ignore
/.travis.yml export-ignore
/Resources/Private/Sass export-ignore
/Resources/Private/compile-sass.sh export-ignore
/Resources/Private/config.rb export-ignore
/Resources/Private/Clickdummy export-ignore
/Tests export-ignore
/Makefile export-ignore
/phive.xml export-ignore
/phpunit.browser.xml export-ignore
/phpunit.functional.xml export-ignore
/phpunit.unit.xml export-ignore

/Tests/Browser/files/* filter=lfs diff=lfs merge=lfs -text
/Tests/Manual/images/* filter=lfs diff=lfs merge=lfs -text
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# In2publish Core Change Log

12.5.2:
- [DOCS] Add known issue to explain missing (orphaned) MM records in the record tree
- [BUGFIX] Discard the table portion of a joined row if the joined record does not exist
- [META] Exclude compile-sass from archive
- [BUGFIX] Cast pageuid to integer to build the preview URL

12.5.1:
- [BUGFIX] Correct evaluation of publishing state
- [BUGFIX] Fixes Databender for Redirects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function createAndMapMmRecords(
if (null === $mmRecord) {
continue;
}
if (!empty($row['local']['table']) || !empty($row['foreign']['table'])) {
if (!empty($row['local']['table']['uid']) || !empty($row['foreign']['table']['uid'])) {
$uid = $row['local']['table']['uid'] ?? $row['foreign']['table']['uid'];
$tableRecord = $this->recordIndex->getRecord($table, $uid);
if (null === $tableRecord) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use TYPO3\CMS\Core\Database\Query\QueryHelper;

use function array_column;
use function array_key_exists;
use function hash;
use function json_encode;
use function substr;
Expand Down Expand Up @@ -139,6 +140,9 @@ public function findByPropertyWithJoin(
// Split the prefix into mmtbl/table (0-5) and the actual column name (6-X).
$splitRow[substr($column, 0, 5)][substr($column, 6)] = $value;
}
if (array_key_exists('uid', $splitRow['table']) && null === $splitRow['table']['uid']) {
unset($splitRow['table']);
}
$mmIdentityProperties = [
$splitRow['mmtbl']['uid_local'],
$splitRow['mmtbl']['uid_foreign'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function replaceLocalWithForeignSourceHost(RecordWasSelectedForPublishing
$coreLinkService = GeneralUtility::makeInstance(LinkService::class);
$linkAttributes = $coreLinkService->resolveByStringRepresentation($target);
if (!empty($linkAttributes['pageuid'])) {
$url = BackendUtility::buildPreviewUri('pages', $linkAttributes['pageuid'], 'foreign');
$url = BackendUtility::buildPreviewUri('pages', (int)$linkAttributes['pageuid'], 'foreign');
if (null === $url) {
return;
}
Expand Down
15 changes: 15 additions & 0 deletions Documentation/KnownIssues.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ that the context menu entry does not know about all conditions which have to be
The context menu is created if the current user is allowed to publish and 3rd party integrations allow the publishing of
this page. The context menu entry does not take into account if the record is actually changed. Publishing a page which
has no changes will result in the message "This record is not yet publishable".

## Orphaned MM records are ignored if foreign_table_where includes condition to joined table

Preconditions:

* You have a TCA select/inline relation with an MM table
* The column config defines an extra `foreign_table_where`
* The `foreign_table_where` contains a constraint on the foreign_table

When there are orphaned MM records, which means that the `uid_foreign` of the MM table points to a record in the joined
table which does not exist, the JOIN query will not return any result, hence the MM record is not fetched from the
database. This will not make a difference in most cases, as TYPO3 uses the same JOIN query to select records, but can
lead to differences if custom queries or code is used to handle MM records. Anyway, these orphaned MM records are
invalid and should be deleted. The community extension https://github.com/lolli42/dbdoctor has shown to be effective.
Manual operation might still be required though.
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.1',
'version' => '12.5.2',
'state' => 'stable',
'clearCacheOnLoad' => true,
'author' => 'Alex Kellner, Oliver Eglseder, Thomas Scheibitz, Stefan Busemann',
Expand Down

0 comments on commit 9b1829b

Please sign in to comment.