Issue Bug Closed

#85406Related files in Text & Media do not get exported / imported correctly

Sybille Peters 06/27/18, 14:53 updated 06/29/18, 11:11

Description

Problem

Import / Export does not work with Files attached to Text & Media

System environment

TYPO3 8.7.16

Reproduce

  1. create page with 1 Text & Media and 1 file attached
  2. Export it using default settings: “This page”, all tables, etc.
  3. import it in a different installation (with default settings), do not force uids

Results

1. On exporting there are error messages for sys_file uid=76: LOST RELATION:

impexp2.png

However, file with uid=76 exists and File is correctly linked to Text & Media as visible in the backend:

select uid,identifier from sys_file where uid=76;
+-----+--------------------------------+
| uid | identifier                     |
+-----+--------------------------------+
|  76 | /user_upload/no_file_found.png |
+-----+--------------------------------+

2. After importing, a wrong image is linked with the Text & Media

sys_file_reference shows that a new sys_file_reference record was created using the same uid_local as in the export installation. Of course, the uid_local=76 corresponds with a different file in this installation.

sys_file_reference
+-------+-----------+-------------+-------------+------------+
| uid   | uid_local | uid_foreign | table_local | tablenames |
+-------+-----------+-------------+-------------+------------+
| 67108 |        76 |      239506 | sys_file    | tt_content |
+-------+-----------+-------------+-------------+------------+

3. Testing this with another installation, the import did not work at all because an exception gets thrown:

Uncaught TYPO3 Exception
#1317178604: No file found for given UID: 207889

Apparently, for this uid, a corresponding sys_file record does not exist yet.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.