impexp: unable to save files in composer mode with var/ outside document root
With TYPO3 9.5 in composer mode with var/ outside document root,
I am unable to export a T3D with files in extra folder.
During the export, the files are written in the transient directory,
and then copied to the final destination, beside t3d file.
\TYPO3\CMS\Impexp\Controller\ImportExportController::exportData() in the
This copy process uses the FAL api to get the list of files in the transient directory and to move them into the targe folder:
But: the FAL api can not handle files/directories outside the public directory,
and this lead to an exception "Folder does not exist"
Step to reproduce
- Have a TYPO3 9.5 instance in composer mode with var/ outside document root
- Start an export of a pagetree with impexp module
- Check "Save files in extra folder beside the export file"
- Start the export by clicking "Save to filename"
- You must see an exception like
Folder "/var/www/html/var/transient/export_temp_files_8084122268506555113" does not exist.
How to fix it?
IMHO impexp should not use FAL api for manipulating transient files.
GeneralUtility::getFilesInDir() and GeneralUtility::upload_copy_move() should be used instead.
#1 Updated by Gerrit Code Review 9 months ago
- Status changed from New 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/c/Packages/TYPO3.CMS/+/60714
#4 Updated by DANIEL Rémy 6 months ago
I found the issue, opened a ticket on forge, created and submitted a patch on gerrit. All that on my work time.
And all this work was just throwed by you and Benni, and my work was tagged as "duplicate".
I don't understand.
Honestly, why should I care about trying to fix bug in the future?
#5 Updated by Susanne Moog 6 months ago
I'm sorry this happened. As an explanation: I'm guessing Benni did not see your patch and stumbled upon the same problem which he then subsequently fixed. As that patch was fresh on top of the list and we were close to a release, it got in pretty quickly.
A few days later, when I went through my other open reviews, I found your patch again - I compared it to the one that Benni did (which was already merged at this point) and saw that it fixes the same problem in the same way. At this point the patch was superfluous hence why I closed both patch and issue.
I'm really sorry I did not remember your patch before reviewing Bennis and I don't really have a good solution for it except for better memory powers. You did it the way we want and I still hope that you will keep up trying to fix things in the future.