Project

General

Profile

Actions

Bug #74125

closed

Exception throwing in sysext\core\Classes\DataHandling\DataHandler.php on copySpecificPage

Added by Ricky Mathew about 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2016-03-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When i tried to copy files from one domain with some what a complex pagetree having 6 to 7 levels of pages and having 2 translations for each page, there throwed an error like this


Uncaught TYPO3 Exception
#1: PHP Warning: Invalid argument supplied for foreach() in /typo3_src-7.6.4/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3635 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
/var/data/www/pits/shyam7/typo3_src-7.6.4/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 111.

14 TYPO3\CMS\Core\Error\ErrorHandler::handleError(2, "Invalid argument supplied for foreach()", "/typo3_src-7.6.4/typo3/sysext/core/Classes/DataHandling/DataHandler.php", 3635, array)

/typo3_src-7.6.4/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
03633:                     }
03634: 
03635:                     foreach ($rows as $row) {
03636:                         // Skip localized records that will be processed in
03637:                         // copyL10nOverlayRecords() on copying the default language record

13 TYPO3\CMS\Core\DataHandling\DataHandler::copySpecificPage(95715, 95688, array, 1) 

if i put

                            foreach ($rows as $row) {
                                // Skip localized records that will be processed in
                                // copyL10nOverlayRecords() on copying the default language record
                                $transOrigPointer = $row[$transOrigPointerField];
                                if ($row[$languageField] > 0 && $transOrigPointer > 0 && isset($rows[$transOrigPointer])) {
                                    continue;
                                }
                                // Copying each of the underlying records...
                                $this->copyRecord($table, $row['uid'], $theNewRootID);
                            }

inside if(!empty($rows)) it works as expected.


Related issues 2 (0 open2 closed)

Has duplicate TYPO3 Core - Bug #75530: Duplicating a pagetree with rightclick, copy and paste throws TYPO3 exception Closed2016-04-12

Actions
Has duplicate TYPO3 Core - Bug #76318: DataHandler::copySpecificPage() throws exception due to bogus TCAClosedAndreas Kienast2016-05-27

Actions
Actions #1

Updated by Ricky Mathew about 8 years ago

  • Assignee set to TYPO3 Release Team
Actions #2

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48311

Actions #3

Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48315

Actions #4

Updated by Andreas Fernandez almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48318

Actions #6

Updated by Andreas Fernandez almost 8 years ago

  • Status changed from Under Review to Resolved
Actions #7

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48319

Actions #8

Updated by Andreas Fernandez almost 8 years ago

  • Status changed from Under Review to Resolved
Actions #9

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF