Project

General

Profile

Actions

Bug #102130

closed

T3D data structure with sys_file_reference entries and missing files makes import fail with type check errors

Added by Garvin Hicking about 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Import/Export (T3D)
Start date:
2023-10-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

From:

https://stackoverflow.com/questions/77255080/t3d-file-import-error-htmlspecialchars-argument-1-string-must-be-of-typ/77255438

Using a T3D file with a structure as below, containing sys_file_reference records with missing files, will make the T3D importer fail because if missing array indices and assumptions that will fail, and not import any content. The core should more "gracefully" fail on this to at least be able to import partial data (with error messages)

Errors yielded were:

Sun, 08 Oct 2023 18:27:27 +0000 [WARNING] request="418b1cee8d80d" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Undefined array key "8e79286a8efa8a13de373312028aee83" in /srv/www/typo3_src-12.4.6/typo3/sysext/impexp/Classes/ImportExport.php line 721
Sun, 08 Oct 2023 18:27:27 +0000 [WARNING] request="418b1cee8d80d" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Trying to access array offset on value of type null in /srv/www/typo3_src-12.4.6/typo3/sysext/impexp/Classes/ImportExport.php line 738
            [records] => Array
                (
                    [sys_file_reference] => Array
                        (
                            [22] => Array
                                (
                                    [uid] => 22
                                    [pid] => 1
                                    [title] => 1024_Kirchhofen_Kirchturm.jpg
                                    [size] => 910
                                    [rels] => Array
                                        (
                                            [sys_file:22] => Array
                                                (
                                                    [id] => 22
                                                    [table] => sys_file
                                                )

                                        )

                                    [softrefs] => Array
                                        (
                                            [link:typolink:4463318f6facace53c799ec9ac121f98:0] => Array
                                                (
                                                    [field] => link
                                                    [spKey] => typolink
                                                    [matchString] => fileadmin/kartan.de/bilder/St_Georgen/1024_Kirchhofen_Kirchturm.jpg
                                                    [subst] => Array
                                                        (
                                                            [type] => file
                                                            [relFileName] => fileadmin/kartan.de/bilder/St_Georgen/1024_Kirchhofen_Kirchturm.jpg
                                                            [tokenID] => 4463318f6facace53c799ec9ac121f98
                                                            [tokenValue] => fileadmin/kartan.de/bilder/St_Georgen/1024_Kirchhofen_Kirchturm.jpg
                                                        )

                                                    [error] => File does not exist!
                                                    [file_ID] => 8e79286a8efa8a13de373312028aee83
                                                )

                                        )

                                )
Actions #1

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

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

Actions #2

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81389

Actions #3

Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81389

Actions #4

Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81389

Actions #5

Updated by Gerrit Code Review about 1 year ago

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

Actions #6

Updated by Gerrit Code Review about 1 year ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81389

Actions #7

Updated by Gerrit Code Review about 1 year ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81389

Actions #8

Updated by Garvin Hicking about 1 year ago

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

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF