Importing using the import/export module

Topics: Troubleshooting
Jul 3, 2012 at 2:30 PM

Hello,

We're going to migrate to Orchard. We are building a tool that creates an xml file which we can upload into the import/export module of Orchard. We use the Orchard Advanced Menu module for our menus.

When we import the xml file, all pages and all menu items get created successfully, however the relation between them does not. I can't figure out why. When create a blank site, add some pages and menu items work working relation and then export that, the xml file looks the same as our self generated xml file.

This is how our generated xml file looks like, with just 1 page and 1 menu item:

<?xml version="1.0" encoding="utf-8"?>
<Orchard>
  <Recipe>
    <Name>Generated by Obec CMS converter</Name>
    <Author>admin</Author>
  </Recipe>
  <Metadata />
  <Settings />
  <data>
    <Page Id="/alias=my-page" Status="Published">
      <CommonPart Owner="/User.UserName=admin" CreatedUtc="2012-04-06T08:44:20Z" PublishedUtc="2012-04-06T08:44:20Z" ModifiedUtc="2012-04-06T08:44:20Z" />
      <BodyPart Text="" />
      <AutoroutePart Alias="my-page" UseCustomPattern="false" />
      <TitlePart Title="My Page" />
      <TagsPart Tags="" />
    </Page>
    <SimpleMenuItem Id="/Identifier=14ce4b83735649f18f45cb79683c01f0" Status="Published">
      <AdvancedMenuItemPart Text="My Page" Position="2" Url="/" MenuName="obec_intranet_main" DisplayText="true" DisplayHref="true" AuthenticationLevel="Any" IncludeReturnUrl="false" RelatedItem="/alias=my-page" />
      <IdentityPart Identifier="14ce4b83735649f18f45cb79683c01f0" />
      <CommonPart Owner="/User.UserName=admin" CreatedUtc="2009-07-31T09:31:59Z" PublishedUtc="2012-04-06T08:44:21Z" ModifiedUtc="2012-04-06T08:44:21Z" />
    </SimpleMenuItem>
  </data>
</Orchard>
I don't see what's wrong with this, can anyone help me figure out what the problem is? Do i have to add something extra to my xml or is there something wrong with the import module itself maybe?

Jul 3, 2012 at 2:46 PM
Edited Jul 3, 2012 at 2:49 PM

Hmm.. i just noticed that, if i import the same xml file twice in a row (without changing it in between), then a lot of the relations do work suddenly, but not all of them. What can this mean?

It's kinda weird and stupid, but if it would work for everything, then i wouldn't mind doing this. Unfortunately it doesn't work for everything :(

//Edit: All the pages that don't work are not normal pages, they are <Documentgallerypages>. So it seems that i maybe have to do something different for pages of that type..

Jul 4, 2012 at 9:04 AM

Hello,

I have tested a bit more and it seems that there's really something wrong with the importing itself, not my tool. I created an empty Orchard website, added a menu and some items to it, with working relations and everything. Then i exported everything, created an empty site again and imported it in there. That way i had the exact same problem.

Coordinator
Jul 4, 2012 at 9:29 AM

Hey Walance,

Import/Export feature has been contributed by the community a while ago - need to revisit it.

Btw, I probably won't be releasing any new updates to the module till Orchard vNext (scheduled to arrive very soon, in mid/end July), unless someone finds a real showstopper. Orchard 1.5 will have a brand new core navigation system that will have almost the whole functionality of Advanced Menu module, making it obsolete in big number of cases. I'm focusing on providing a seamless migration atm.

Jul 4, 2012 at 10:32 AM

Hey pszmyd,

I didn't know that about 1.5, i think i will wait for that version then and see what i can do with it and if the importing works better for that.

If you do find anything about importing with the Advanced Menu module, please let me know.