Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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, ...Unable to Export Site Template - Another Strange ErrorUnable to Export Site Template - Another Strange Error
Previous
 
Next
New Post
6/8/2016 10:11 AM
 
It's 2016, version 7.2 on my case and I get the same error and I still can't find a solution. DNN is letting me down! :(
 
New Post
6/8/2016 10:51 AM
 
Robert Murrell wrote:

Hi All,

I need help deciphering another strange error I'm getting when trying to export a template of a certain website. Here's the error I get. FYI, I am trying to include the site content in the template.

Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Entities.Tabs.TabController.SerializeTab(XmlDocument tabXml, Hashtable tabs, TabInfo tab, PortalInfo portal, Boolean includeContent) at DotNetNuke.Modules.Admin.Portals.Template.SerializeTabs(XmlWriter writer, PortalInfo portal, Hashtable tabs, TabCollection tabCollection) at DotNetNuke.Modules.Admin.Portals.Template.SerializeTabs(XmlWriter writer, PortalInfo portal) at DotNetNuke.Modules.Admin.Portals.Template.cmdExport_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

For those of you that may remember my last post, yes, I did make sure the template file name contains no spaces or special characters this time. The odd thing about this error is that it persists even after the site has been migrated to an entirely different server. I am trying to export the template on the second, new server now. I believe the server is running at least DNN 6.2.3

My thanks in advance to anyone who can make sense of this.

 I found that this is mostly caused by errors in the page structure (in the database).
Here are some scripts I use to check the page structure:

 

DNN pages wrong order (DNN 5.3 & 5.4)

If a page is moved either with the pages module or from the page settings, it can be that the pages Tabpath and Level are out of sync. In that case pages disappear or appear in places they shouldn't

Get All pages with the described issue.

SELECT tabid,
       taborder,
       portalid,
       tabname,
       isvisible,
       parentid,
       level,
       isdeleted,
       tabpath
FROM   tabs
WHERE  NOT ( ( Len(tabpath) - Len(Replace(tabpath, '//', '')) ) / Len('//') - 1
             = level
           ) 

Correct the issue described for all pages

UPDATE tabs
SET    level = ( Len(tabpath) - Len(Replace(tabpath, '//', '')) ) / Len('//') - 1 

 

TabPath and level out of sync

I found that sometimes pages can have the correct tabpath and parentid but the wrong level.
In that case the Level of Tab and Parent are the same.

Find pages with this issue:

SELECT *
FROM  (SELECT tabid,
              portalid,
              tabname,
              [level] AS TabLevel,
              parentid,
              parentlevel
       FROM   tabs T
              JOIN (SELECT tabid   AS PId,
                           [level] AS ParentLevel
                    FROM   tabs Parent) P
                ON ( P.pid = T.parentid )) AS X
WHERE  tablevel > 0
       AND NOT tablevel - parentlevel = 1 

 

Sibling pages with the same name.

In DNN 4 you could create 2 pages with the same name on the same level in a portal.
This is not allowed in DNN 5, but an upgraded site (4>5) could still have them as they were allowed in DNN4, which could cause issues.
In some later versions it was also possible to create this issue by moving the a page.

Find pages with this issue:

SELECT items,
       tabpath,
       tabname,
       portalid
FROM   (SELECT Count(tabpath) AS Items,
               tabname,
               tabpath,
               portalid
        FROM   tabs
        WHERE  tabpath NOT LIKE '%Admin%'
               AND tabpath NOT LIKE '%Host%'
        GROUP  BY tabname,
                  tabpath,
                  portalid) AS Temp
WHERE  items > 1

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Unable to Export Site Template - Another Strange ErrorUnable to Export Site Template - Another Strange 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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out