When trying to use the import-site-setup form of collective.themesitesetup manually in a test site, traversal to the import-site-setup form fails with the following code portal.unrestrictedTraverse(directory_string + "/@@import-site-setup”). Manually navigating to the form page in a robot framework instance of phone seems to work fine. In an attempt to get the functionality working anyway, I copied the code executed to handle the form import into the test setup. However, only top-level content is created, with all content within folders not being created.
Any suggestions as to why the themesitesetup behaves so differently when called from setUpPloneSite within the test site setup compared to a running Plone instance?
Unfortunately, the structure (content) import step is one of the many parts of Plone that have not get the love they would have deserve lately, so anything is possible
So, according to your research, this adapter call only fails during setUpPloneSite, but succeeds later when the test server is running? That's surprising.
Is this Plone 4 or Plone 5? With both Dexterity and Archetypes or only Dexterity?
This is working on a Plone 5.0 site using only Dexterity types.
I'm debugging now, but including the extras.zcml (self.loadZCML(package=collective.themesitesetup, name="extras.zcml") seems to break the test site setup as it cannot install any of the GenericSetup profiles. This is as a result of the following adapter registration:
Thanks for the details. extras.zcml being broken is expected, because it was originally made for Plone 4.3.
Yet, I from the source I cannot figure out any obvious reason, why it behaves differently in test setup than in running site. I'll see if I can find time to try this out...
@JeffersonBledsoe Hi, we shortly discussed about your use case during the Plone Conference party. If I understood properly, your primarly goals is to populate Plone at CI for better tests and also other options than themesitesetup would work.