Epic #72584: sysext:impexp
TCA not updated before t3d/xml file will be imported
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.
#2 Updated by Raphael Zschorsch over 5 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?
#4 Updated by Raphael Zschorsch over 5 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.
#5 Updated by Alexander Opitz over 5 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.
#6 Updated by Raphael Zschorsch over 5 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.
The Storage Folder gets imported, but the records are still missing.
#7 Updated by Raphael Zschorsch over 5 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. :)