Task #52593

Epic #55070: Workpackages

Epic #54542: WP: Importer / Exporter with relations MM/IRRE/FAL

Story #55521: As an User I want to create exports in v. 4.x and import them in v. 6.2

Impexp: make 4.x exports work as import in 6.x

Added by Marc Bastian Heinrichs almost 2 years ago. Updated over 1 year ago.

Status:Resolved Start date:2013-10-07
Priority:Should have Due date:
Assigned To:Marc Bastian Heinrichs % Done:

100%

Category:Import/Export (T3D) Spent time: 14.50 hours
Target version:6.2.0
TYPO3 Version:6.0 Complexity:
PHP Version:5.3 Sprint Focus:

Description

Exports from version 4.x are not compatible with FAL.
On importing such an export in version 6.x the images needs
to be moved and added to sys_file.

  • related images from uploads/ (e.g. tt_content:images and pages:media) are moved to fileadmin/_import/.
  • linked files are moved to the original folder structure below fileadmin/_import/.
  • (!!!) Files from fields of old type group file should NOT be moved

pagetest.xml Magnifier (10.5 kB) filigivuji filigivuji, 2014-04-04 20:09


Related issues

related to Core - Bug #46679: impexp: Import in v6 fails with fal-error Closed 2013-03-26
related to Core - Task #57006: SoftReferenceIndex typolink[linkList] missing support sep... Resolved 2014-03-17
related to Core - Task #55530: Avoid to find a file object with uid 0 Resolved 2014-01-31
duplicated by Core - Bug #53275: Import of 4.* t3d exports to 6.* typo3: files do not work Closed 2013-11-01

Associated revisions

Revision 846ebe67
Added by Marc Bastian Heinrichs over 1 year ago

[BUGFIX] Fix impexp for importing exports from version 4.x

This patch introduces FAL support in impexp for the import of
exports done in version 4.x by using a legacy mode. Related images
from uploads/ (tt_content:images and pages:media) are moved to
the folder /_imported/ below users default storage.
Linked files and RTE images are moved to the original folder
structure below the folder /_imported/ below users default storage.

Also the images additional information, like titleTexts and links are
migrated to the new created file reference record.

These scenarios are covered with functional tests:
  • pages media
  • pages_language_overlay media
  • tt_content images
  • links to files
  • links to files in RTE
  • images in RTE
  • other records using fields of type "group" internal_type "file"
    or "file_reference" in TCA and FlexForm fields.

Resolves: #52593
Releases: 6.2
Change-Id: I170ec20827af255f85ddc0fd51ffe30df7ef6b4e
Reviewed-on: https://review.typo3.org/22939
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert

History

#1 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22939

#2 Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22939

#3 Updated by Sten _ almost 2 years ago

hi Marc, your patch works only partially

importing failed...

error: #1321023156: uid property is already set. Cannot merge index record. (More information)

Trace is here: http://pastebin.com/z27m8qDR

#4 Updated by Sten _ over 1 year ago

Well, it seems that the problem is with records that have files associated with them.

#5 Updated by Sten _ over 1 year ago

connecting it with this patch: http://forge.typo3.org/issues/52972 brings no error, but completely broken image paths

#6 Updated by Ernesto Baschny over 1 year ago

  • Parent task set to #54542

#7 Updated by Marc Bastian Heinrichs over 1 year ago

  • Parent task changed from #54542 to #55521

#8 Updated by Marc Bastian Heinrichs over 1 year ago

  • % Done changed from 0 to 30

#9 Updated by Marc Bastian Heinrichs over 1 year ago

  • Status changed from Under Review to Accepted

#10 Updated by Marc Bastian Heinrichs over 1 year ago

  • Category changed from File Abstraction Layer (FAL) to Import/Export (T3D)

#11 Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22939

#12 Updated by Gerrit Code Review over 1 year ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22939

#13 Updated by Gerrit Code Review over 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22939

#14 Updated by Gerrit Code Review over 1 year ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22939

#15 Updated by filigivuji filigivuji over 1 year ago

Is this patch not yet finished or did I miss something?
I applied patch set 8 but still get the "uid of fileusage (sys_file_reference) has to be numeric" when importing a 4.5 project.

#16 Updated by Marc Bastian Heinrichs over 1 year ago

Hey,
to have a correct export in 4.x you need to add also patches to
these versions ATM:
for 4.5:

And if this also don't fix your problem, could you provide some small export in xml format, that I could test this?

#17 Updated by filigivuji filigivuji over 1 year ago

Thanks for your help.
I applied those two patches, same error message as before ("uid of fileusage (sys_file_reference) has to be numeric").
Tested on fresh installations of 4.5 and 6.2 with all three patches applied (for the 6.2 patch, I omitted the test files and only patched ImportExport.php).
Attached the export as XML.

#18 Updated by Gerrit Code Review over 1 year ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/22939

#19 Updated by Marc Bastian Heinrichs over 1 year ago

Check the updated patchset. There was indeed a bug, when the folder "_imported" was already created.

#20 Updated by filigivuji filigivuji over 1 year ago

Works now, thanks.

#21 Updated by Marc Bastian Heinrichs over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 30 to 100

Also available in: Atom PDF