I have exported my Dexterity Content Types profiles in a zip with all the behaviors and fields information, then I have deleted all this content types profiles and now I want to import this Type Profiles but Plone don't let me import the zip file.
Can anyone help me?
PS: I can import these content types one by one, but you know hahaha
You can write a script which imports the members of the zip archive one at a time (Python has a
zipfile module which understands zip files).
Maybe, someone else has an easier solution.
I think you can import them in /portal_setup, but you might have to 'tar' them (instead of zipping them, so extract the zip file and use tar or gz ). PS: The import says you can use zip there, but it is not right… it is 'one of those other compressions'.
PS: taken from memory as I am not working today
I think that you may have hit a bug in Plone where imported content types are not displayed in the Control Panel after importing them successfully. If when retrying Plone answers that the types already exist, try to restart it.
Your memory may have failed you indeed; Plone can import a zip file - that's why I checked because a software exporting in zip format and importing a tar format was a bit strange and that's not the case, import of types has been coded with Zip format since at least 2013.
However there is probably a problem with the import - my guess is that it works very well in the simulated world of automated tests but less well in the real world. There are strange refresh problems with this Dexterity control panel, I have already seen curious and difficult to reproduce things.
I try this but when I go to "Import content types" in the /portal_setup and I upload the zip file the new content don't appear
Probably I was wrong about this (but it should work if you export the types from /portal_setup