#107498Missing assets in export
Description
While exporting a page with content and assets, ticking the checkbox “Save files in extra folder beside the export file (supported for ‘Save to filename’ only)” has no impact; the folder for the export is created, but it contains no assets.
In my case, the page contains one image in a “Text & Media” element. The XML looks ok, and the folder is created but empty.
Tested and found in 13.4.12
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 2
History 4
-
Garvin Hicking commented and changed TYPO3 Version
1312 <span data-processor="relativetime" data-value="2025-09-21T19:33:58+00:00" > 09/21/25, 19:33 </span> -
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-09-22T19:52:56+00:00" > 09/22/25, 19:52 </span>I can’t reproduce that, just did an export in 13.4.19-dev and imported it in a 14.0-dev. Important is that all relations are exported as well
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2025-09-24T05:33:46+00:00" > 09/24/25, 05:33 </span>
@just2b It’s about the binary referenced image files.
this does not work down to TYPO3 8.7 – the checkbox only seems to affect files that are put into flexform relations and one other place.
My expectation would be to see the referenced fileadmin/ assets in that directory.
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-10-07T20:03:08+00:00" > 10/07/26, 20:03 </span>I had another look at this and could reproduce an empty files folder, but it is caused by the export configuration, not by the “Save files in extra folder” option itself.
The referenced binary files are only exported if the
sys_filerecords are part of the export. Asys_filerecord lives on pid 0, so it is never picked up by the page tree selection – it is only added via the relations of the exported records:tt_content->sys_file_reference(on the page, exported by the page tree)sys_file_reference->sys_file(pid 0, only exported if relations tosys_fileare included)
So the field “Include relations to tables” (tab “Configuration”) must contain
sys_fileor “ALL tables”. This field is empty by default when the export module is opened.Tested on main with a page containing a “Text & Media” element with one image, “Save to filename”, option “Save files in extra folder” checked:
Include relations to tables exported records files_fal<export>.files/(empty, default) pages,tt_content,sys_file_referencenone created, but empty ALL tables additionally sys_file,sys_file_storage,sys_file_metadata1 file contains the image The same works on the CLI:
vendor/bin/typo3 impexp:export my_export --pid=1161 --table=_ALL --include-related=_ALL --save-files-outside-export-file
Note that the files in the folder are named by their SHA-1 hash without file extension (e.g.
da5ad453fde37bb84dfed317e656af27d877ffcf), not by their original file name. The mapping to the file name is stored infiles_falof the export file. This is what the import expects.So this is not a bug in the file export. However, it is an easy trap: without any hint, the export silently contains file references pointing to files that are not part of it, and an empty files folder is created. I’d suggest to improve that instead:
- add a message to the export error log if exported records reference
sys_filerecords that are not part of the export - don’t create the
.filesfolder if there are no files to save
but this is a different issue then.
This is also not working in 12.4 for me. Superficial code check shows that sys_file_reference seems to not be part of the softref parsing code that would store referenced files with a type=file.
I very vaguely remember discussing this a year or so ago and somehow believe there was some kind of intent or reasoning why sys_file_references were not exported. I don’t have older TYPO3 versions right now to check if this worked in earlier versions so that we might pinpoint a commit that might have removed this by intention. If so, the option should receive more detailed labelling.