Project

General

Profile

Actions

Bug #88293

closed

impexp: unable to save files in composer mode with var/ outside document root

Added by Rémy DANIEL almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Import/Export (T3D)
Target version:
-
Start date:
2019-05-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.
(see \TYPO3\CMS\Impexp\Controller\ImportExportController::exportData() in the if ($inData['save_export'])

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:
ResourceStorage->getFolder(), Folder->getFiles() and ResourceStorage->moveFile().

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.

Patch attached.


Files

typo3_impexp_transient.patch (1.43 KB) typo3_impexp_transient.patch Rémy DANIEL, 2019-05-07 14:56

Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #88815: Import Export uses FAL for temporary filesClosedBenni Mack2019-07-22

Actions
Actions

Also available in: Atom PDF