Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Exported Template File Throws ErrorExported Template File Throws Error
Previous
 
Next
New Post
8/3/2014 6:00 PM
 

I've created a custom module for users to make child portals without having to be host users.  The site will need to have child portals made on a regular basis by sales people, so obviously the functionality is hidden and all sales folks know is they fill in a dozen or so text boxes, click a button and a site is made.

That's just some FYI.  The current template with the old skin works fine.  We've updated to a newer, DNN 7.x custom skin so need to export a new template file.

I've created the file but when I try to do portal creation now I get this error at the top of the page:

ABFRTemplate_NewSkinTest.template is not a valid Site Template File.

I get the same detail error below on the page, many times, so I'll just copy one:

Validation Results

The element 'module' has invalid child element 'uniqueId'. List of possible elements expected: 'ownerportalid, KeyID, modulesettings, definition, content, visibility, webslicetitle, tabmodulesettings, webslicettl, websliceexpirydate, Terms, showtitle, moduledefinition'.

The error shows up over 50 times.

I did try a custom export first, figured I left out pages that needed to be there so tried exporting again not doing any advanced configuration.  Same deal.

Where this does come up on Google, the one article says the malfunction could not be reproduced.

I'll try editing the new file to use the skin we want, possible I can just handle the issue that way but would prefer just to export what we have and do it in a few minutes. :)

Thanks for any help.

 
New Post
8/3/2014 6:39 PM
 
Here is the C# code for using the template file:
foreach (var template in templates)
{
if (template.Name == Localization.GetString("PortalTemplateName.Text", LocalResourceFile))
{
var item = CreateListItem(template);
cboTemplate.AddItem(item.Text, item.Value);
var ourTemplate = TestablePortalController.Instance.GetPortalTemplate(template.Name, Thread.CurrentThread.CurrentUICulture.Name);
}
}

We're on version 07.02.01 (367), so I think what I'm using is recent enough. I tried commenting out all tags in the .template file to see what that would do but then the repeating error (388 times, just like the first) is that there is no culture code. But, checking the tag in the working file, it isn't there either. All the tags are self-closing.

There is no .resources file for the template. The other template files do have this. This could be what is causing the issue but there is no checkbox, option, on export where this can be omitted. So it should be included, right?
 
New Post
8/4/2014 5:27 AM
 
sorry for the double self-rely above. There is no way to delete anything.

Looking at the error: The element 'module' has invalid child element 'uniqueId'. List of possible elements expected: 'ownerportalid, KeyID, modulesettings, definition, content, visibility, webslicetitle, tabmodulesettings, webslicettl, websliceexpirydate, Terms, showtitle, moduledefinition'. ... it is telling me what it expects and doesn't like what I'm giving it. But after removing any unique IDs it then complains about tags, which exist in the current template file that *does* work. Note the culture code tags are self-closing (no child elements). They're self-closing on both the working / non-working template export files.

Looks like template export isn't clean? Is this actually a bug for Gemini? (If that's still what they call the app where bugs are entered)

Thanks!

Mike Durthaler
 
New Post
8/4/2014 6:25 AM
 
are you trying to Import in a previous Version? otherwise, this might have been a bug in 7.2.1, which should have been fixed meanwhile - you may consider an upgrade of your site.

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/4/2014 8:30 PM
 

Thanks, an upgrade is what I'll try.

We are on 7.2.1 and to make sure I said everything correct, the old template from a year or more ago works.  It is the new template exported from 7.2.1 that my custom code tries to read that bombs.

If I use the exported template to create a site from Host | Site Management, it works.  My code is a copy of the DNN Child Portal Creation code.  Since it will work and allow users in certain roles to create portals, it should be fine on importing.

It seems to be a question of the code importing a template created on the 7.2.1 site.

Well, an upgrade, another export and we'll see what happens.  If this does not work I probably need to review the current code which generates portals from Host | Site Management and find what's missing from my version.

Has the portal creation code changed significantly since about 6.5 or so?  I'm not sure of the exact 6.x.x version where I copied the code from but if that's changed a lot then that may be the issue.

Thanks, Sebastian!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Exported Template File Throws ErrorExported Template File Throws Error


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out