Bug #62081
closed
Epic #72584: sysext:impexp
TCA not updated before t3d/xml file will be imported
Added by Raphael Zschorsch almost 10 years ago.
Updated over 4 years ago.
Category:
Extension Manager
Sprint Focus:
Needs Decision
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.
- Category set to Import/Export (T3D)
Does the table of your extension is there?
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?
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?
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.
- 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.
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.
- % 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. :)
- 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.
- Parent task set to #72584
Hey,
we fixed this in v9 recently, so enjoy :) Sorry for the long delay. If there is still an issue, let me know.
- Status changed from New to Closed
- Sprint Focus changed from PRC to Needs Decision
Also available in: Atom
PDF