Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Error when attempting to edit on page (PageTypeBuilder related)

Vote:
 

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 http://labs.dropit.se/blogs/post/2009/10/22/How-to-get-PageTypeBuilder-to-work-with-EPiServer-Composer.aspx 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
Vote:
 

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
Vote:
 

Hey Joel,

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

#38687
Apr 18, 2010 19:57
Vote:
 

thanks for the reply. this seems to fix the problem.

#38690
Apr 19, 2010 10:09
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.