T3D export of tt_content elements with IRRE relations between each other fails
When exporting a structure containing grid elements to a T3D, there will be lots of warnings about elements being "recursive".
A reimport will on the hand give all elements back, but the relations will be completely broken.
Relations between elements are constructed using proper TCA settings of the type "inline".
Even the rest of the setup for the fields is done with plain core funcitonality.
So it seems there is a problem while exporting tt_content elements that are related to each other.
The result after importing it, gives the impression, that it might be a double export attempt on any child element, so that they will be exported as single elements once, and in a second attempt there is a try to export them again as a child element of a parent grid.
The last one fails leaving us with child elements moved from their container element to the page.
Tested with 4.6.x, but I guess the problem will be the same with 4.5.x
Updated by Jo Hasenau over 11 years ago
The problem with the double elements is a reulst of a process_datamap hook action of grid elements itself.
But this is just due to the fact that process_datamap is used while importin as well, but without any additional information about TCE main being called by the import action.
So the hook methods will apply stuff that should be applied while copying, moving or creating elements during the usual editing process only.
The solution is to provide a boolean switch, that can be set during the import so that the hooks will "know" about the "isImporting" state.