Blog posts - recent

MOSS 2007 / WCMS development - Failed to instantiate file "default.aspx" from module "MODULE": The specified list does not exist.

Here we go again: Playing around with SharePoint 2007 xml to create site definitions, site columns or content types isn’t always easy and fun. You have to be careful because forgetting something will result in an error message which may be unhelpful. In this case I got a helpful error message after forgetting an attribute in my module.

Problem description

The error says that something is wrong with the default.aspx: “Failed to instantiate file "default.aspx" from module "MODULE": The specified list does not exist.”

image

So I thought about reviewing the onet.xml.

Solution

The default.aspx couldn’t be saved since I forgot to write the Url to the pages library.

<Module Name="[MODULE]" Url="" Path="">
  <File Url="default.aspx" Type="GhostableInLibrary" >
    <Property Name="Title" Value="$Resources:cmscore,IPPT_HomeWelcomePage_Title;" />
    <Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/
pagelayout.aspx, ~SiteCollection/_catalogs/masterpage/pagelayout.aspx
" /> <Property Name="ContentType" Value="Page ContentType" /> <Property Name="PublishingAssociatedContentType" Value=";#Page ContenType;#
[CONTENTTYPEID];#
" /> </File> </Module>

After putting in the correct Url I was able to create new sites:

<Module Name="[MODULE]" Url="$Resources:cmscore,List_Pages_UrlName;" Path="">
  <File Url="default.aspx" Type="GhostableInLibrary" >
    <Property Name="Title" Value="$Resources:cmscore,IPPT_HomeWelcomePage_Title;" />
    <Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/
pagelayout.aspx, ~SiteCollection/_catalogs/masterpage/pagelayout.aspx
" /> <Property Name="ContentType" Value="Page ContentType" /> <Property Name="PublishingAssociatedContentType" Value=";#Page ContenType;#
[CONTENTTYPEID];#
" /> </File> </Module>

You can find the missing part in line 1.

Comments

10/5/2009 8:50:11 AM #

MOSS 2007 / WCMS development - List does not exist

MOSS 2007 / WCMS development - List does not exist

andreas glaser

Add comment




  Country flag

biuquote
Loading