[BUGFIX] Duplicate ids in form view on record translation
authorHelmut Hummel <helmut.hummel@typo3.org>
Sun, 7 Oct 2012 19:16:15 +0000 (21:16 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sun, 7 Oct 2012 20:32:26 +0000 (22:32 +0200)
If a record shall be localized in the page module the accordant
form view gets loaded twice with the same id.

Fixes: #41659
Releases: 6.0
Change-Id: I396518433170e032b09d1d1026fc7fe6c3b0b85f
Reviewed-on: http://review.typo3.org/15383
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/backend/Classes/View/PageLayoutView.php

index a26f177..0bd360d 100644 (file)
@@ -1528,7 +1528,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                $recs[$c] = $row['uid'];
                                // Create the list of the next three ids (for editing links...)
                                for ($a = 0; $a < $nextTree; $a++) {
                                $recs[$c] = $row['uid'];
                                // Create the list of the next three ids (for editing links...)
                                for ($a = 0; $a < $nextTree; $a++) {
-                                       if (isset($recs[$c - $a])) {
+                                       if (isset($recs[$c - $a]) && !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->tt_contentData['nextThree'][$recs[$c - $a]], $row['uid'])) {
                                                $this->tt_contentData['nextThree'][$recs[$c - $a]] .= $row['uid'] . ',';
                                        }
                                }
                                                $this->tt_contentData['nextThree'][$recs[$c - $a]] .= $row['uid'] . ',';
                                        }
                                }