Project

General

Profile

Bug #85406

Updated by Sybille Peters almost 6 years ago

h2. Problem 

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

 h2. System environment 

 TYPO3 8.7.16 

 h2. Reproduce 

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


 h2. Results 

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

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

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

 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. 

 <pre> 
 sys_file_reference 
 +-------+-----------+-------------+-------------+------------+ 
 | uid     | uid_local | uid_foreign | table_local | tablenames | 
 +-------+-----------+-------------+-------------+------------+ 
 | 67108 |          76 |        239506 | sys_file      | tt_content | 
 +-------+-----------+-------------+-------------+------------+ 
 </pre> 

 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.

Back