[BUGFIX] Collect correct information on elements in page 29/31929/3
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Fri, 1 Aug 2014 04:55:35 +0000 (06:55 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 23 Aug 2014 12:32:18 +0000 (14:32 +0200)
In the page module information on neighboring content elements is
collected while building the page layout. This information must
be remembered for other elements on the page instead of generated
new when rendering each element. This makes sure the move buttons and
edit buttons have the correct URLs.

Resolves: #60199
Releases: 6.3, 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I9fec256b145fe8aba229d8b026fba73871942347
Reviewed-on: http://review.typo3.org/31929
Reviewed-by: Robert Heinig <robert.heinig@3m5.de>
Tested-by: Robert Heinig <robert.heinig@3m5.de>
Reviewed-by: Gerwin Kramer <gerwinkramer@gmail.com>
Tested-by: Gerwin Kramer <gerwinkramer@gmail.com>
Reviewed-by: Jo Hasenau <info@cybercraft.de>
Tested-by: Jo Hasenau <info@cybercraft.de>
Reviewed-by: Stefan Holz <sh@atlantismedia.de>
Tested-by: Stefan Holz <sh@atlantismedia.de>
Reviewed-by: Christian Hernmarck <ch_t3@hernmarck.ch>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/View/PageLayoutView.php

index 5d49fc8..73d38ce 100644 (file)
@@ -1864,11 +1864,13 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         * @return void
         */
        protected function generateTtContentDataArray(array $rowArray) {
-               $this->tt_contentData = array(
-                       'nextThree' => array(),
-                       'next' => array(),
-                       'prev' => array(),
-               );
+               if (empty($this->tt_contentData)) {
+                       $this->tt_contentData = array(
+                               'nextThree' => array(),
+                               'next' => array(),
+                               'prev' => array(),
+                       );
+               }
                foreach ($rowArray as $key => $value) {
                        // Create the list of the next three ids (for editing links...)
                        for ($i = 0; $i < $this->nextThree; $i++) {