Error when attempting to edit on page (PageTypeBuilder related)

CMS 5 R2 SP2 - Composer 3.2.6

I'm trying to incorporate the Composer Sample Package into an existing project which happens to use PageTypeBuilder.

I tried making the changes suggested here to get PageTypeBuilder working but i seem to be getting a different error.

I'm now not using PageTypeBuilder for my Composer pages and just doing it in the recommended way given in the Sample Package - using public templates masterpage.

The page types and controls are all registered but when I attempt to edit the page I get the following error:

Line 36:     var pageContainer = new Extension.UI.LanguageBranch();
Line 37:     pageContainer.Initialize('<%= CurrentPage.PageLink.ID.ToString() %>', '<%= pageContent.ClientID %>', '<%= CurrentPage.LanguageBranch %>', '<%= EPiServer.ClientScript.ClientScriptUtility.ToScriptSafeString(CurrentPage.PageName) %>');
Line 38:     pageContainer.Render('<%= XmlData %>');
Line 39:     var pageCallback = new Extension.CallbackLanguageBranch(pageContainer);

Source File: c:\EPiServer\Sites\SiteName\wwwroot\Dropit\Plugin\Extension\UI\Edit\Controls\LanguageBranchControl.ascx    Line: 38

Stack Trace: 

[NullReferenceException: Object reference not set to an instance of an object.]
   PageTypeBuilder.PageTypeResolver.ConvertToTyped(PageData page) +11
   PageTypeBuilder.Initializer.DataFactory_LoadedPage(Object sender, PageEventArgs e) +20
   EPiServer.PageEventHandler.Invoke(Object sender, PageEventArgs e) +0
   EPiServer.Core.PageStoreBase.RaisePageEvent(Object key, PageEventArgs eventArgs) +76
   EPiServer.DataFactory.GetPage(PageReference pageLink, ILanguageSelector selector) +169
   Dropit.Extension.UI.Edit.Controls.LanguageBranchControl.LoadLanguageBranch(PageReference pageLink) +268
   Dropit.Extension.UI.Edit.Controls.LanguageBranchControl.get_XmlData() +57


If anyone has any ideas or where I can look for further info I'd be very grateful.

#38078 Mar 29, 2010 13:19
  • I have started again with the sample composer project and tried to add PageTypeBuilder to this project. As soon as I add the references and rebuild, I get this same error as above when I try "Composer - Edit on page". 

    Am I the only person who has had this error?

    #38477 Apr 12, 2010 11:31
  • Hey Joel,

    you're not alone in getting the error. I wrote a blog post about it here.

    #38687 Apr 18, 2010 19:57
  • thanks for the reply. this seems to fix the problem.

    #38690 Apr 19, 2010 10:09
First   1   Last