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

Also available in: Atom PDF