Project

General

Profile

Actions

Bug #67188

closed

Epic #72584: sysext:impexp

Wrong FAL References after Import

Added by Robert Heinig almost 9 years ago. Updated over 5 years ago.

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

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Scenario:
Export source systen:
Two sys_file entries were exported with uids 1 and 2. They both have sys_file_reference entries.
Import target system:
There is already one sys_file entry with uid 1.

After Import all sys_file_reference references formerly referenced to sys_file:1 will be referenced to sys_file:3, but they should be refrenced to sys_file:2.

This behavior is caused by TYPO3\CMS\Impexp\ImportExport::fixUidLocalInSysFileReferenceRecords(). During import this function will correctly replace sys_file:1 references with sys_file:2. But when it looks for sys_file:2 to replace, it will not only replace "old" sys_file:2 occurrences, it replaces all sys_file:2 occurrences, which is wrong, because the there are old and new sys_file:2 present in the records array.

Solution:
I fixed this issue with setting a "processed" flag within fixUidLocalInSysFileReferenceRecords() as sibling of the "data" array when replacing the uid_local value of a sys_file_reference entry. Besides checking for file uid equality the if condition checks whether the "processed" flag was set.

There may be a better solution for this problem, i donĀ“t know the impexp extension very well.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #84041: Existing file references are modified after export/importClosedMarkus Klein2018-02-26

Actions
Has duplicate TYPO3 Core - Bug #72207: Files missing in import/exportClosed2015-12-14

Actions
Actions

Also available in: Atom PDF