Bug #62081
closedEpic #72584: sysext:impexp
TCA not updated before t3d/xml file will be imported
0%
Description
I'm using TYPO3 6.2.5 and am trying to build a distribution package with help of a t3d file (I also tried xml - same result). Everything is working fine so far, except that my custom records are not imported in a fresh TYPO3. They are shown in the Import/Export module and are present in the xml file but they are completely missing in the new TYPO3 and the database.
Did I miss some configuration or something? powermail records and backend layouts are all there, it's just my extension.
Updated by Alexander Opitz almost 10 years ago
- Category set to Import/Export (T3D)
Does the table of your extension is there?
Updated by Raphael Zschorsch almost 10 years ago
I think I got your question and yes - the distribution extension is also the extension which creates the tables where the records should be afterwards.
As I understood it, a distribution works like this:
- Execute ext_tables.sql from extension
- Download dependency extensions and install them
- Create fileadmin/foo folder
- Import t3d file (tree, records, etc.)
What I did now, is import the t3d file again, after the import of the distribution and the records are there. That would then mean, that the ext_tables.sql is processed after everything else, which means that the records, the t3d files includes are ignored, because the tables don't exist yet, right?
Shouldn't the ext_tables.sql be processed at first?
Updated by Alexander Opitz almost 10 years ago
Maybe the processing is in the false order ... maybe a cache isn't cleared correctly (so the core do not know about the table after they are "installed").
Does one of the existing distribution adds tables and fills them up?
Updated by Raphael Zschorsch almost 10 years ago
Okay what I tried now:
First way- Import another small extension with the ext_tables.sql as a dependency, so the tables are present, when the t3d file is imported (assuming the ext_tables.sql was previously processed last)
Data is still not imported!
Second way- Same as first way but I installed the "base" extension with the ext_tables.sql file manually so the tables are all there when I install the distribution package
Data is still not imported!
I'm out of options now, so any help would be appreciated. I looked at some other distributions and they don't include a ext_tables.sql file.
Updated by Alexander Opitz almost 10 years ago
- Category changed from Import/Export (T3D) to Extension Manager
Hmmm, so I can't help there. And I don't understand how it worked then from your comment 2 by importing it twice.
As it seams importing via import/export seams working I move this to category Extension Manager.
Updated by Raphael Zschorsch almost 10 years ago
Ok, I tried a third thing. Instead of a full page tree export with records, tt_content, etc., I just exported the records which are not working and which are located in a Storage Folder.
Result
The Storage Folder gets imported, but the records are still missing.
Updated by Raphael Zschorsch almost 10 years ago
- % Done changed from 0 to 100
Okay, I found the solution. The approach with a second extension, which is set as a dependency was right, but I only moved the ext_tables.sql file to that extension.
After a lot of debugging of the import process, I found out, that $GLOBALS['TCA'] of the table has to be set, which is actually not the case, when the TCA definitions are still in the distribution extension. Therefore, I moved everything for the custom tables (ext_tables.sql, ext_tables.php, Models, etc.) to the second extension, which is installed before and the TCA is therefore ready, when the T3D import starts and the records are then successfully imported.
I hope this will help other people to build awesome distribution packages in the future. :)
Updated by Alexander Opitz almost 10 years ago
- Subject changed from Records which were exported in a t3d/xml file are not imported to TCA not updated before t3d/xml file will be imported
- % Done changed from 100 to 0
Anyway, I think this needs to be fixed.
Updated by Benni Mack almost 6 years ago
Hey,
we fixed this in v9 recently, so enjoy :) Sorry for the long delay. If there is still an issue, let me know.
Updated by Benni Mack over 4 years ago
- Sprint Focus changed from PRC to Needs Decision