Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

ContentData cast of pagetype is not compatible

Vote:
 

I'm getting the following exception trying to start my EPiServer site that has been upgraded to EPiServer 7 and converted from PTB to EPiServer style of typed pagetypes: 

ContentData Cast. The requested type is not compatible with EPiServer.Core.PageData. I get this exception when the Webform-page tries to access CurrentPage.

 

The pagetype looks like this:

 

[ContentType(DisplayName = "[Inside]StartPage",Order = 9999,Description = "Start page of the site")]
public class StartPagePageType : EPiServer.Core.PageData
{

... code ...

}

 

And the Webform like this:

 

public partial class Default : EPiServer.TemplatePage<StartPagePageType>
{

.... code ...

}

What I'm missing out on? I couldn't get the site running after converting to EPiServer 7 due to some incompability problems with PTB so we went with converting the pagetype classes to the EPiServer style, and now that doesn't work either.

I also get some exception about PlugInAssembler of TinyMCE when I try to access the site via old-fashioned edit-mode, but that might be related to our TinyMCEPlugIn we made.

#64840
Jan 11, 2013 10:45
Vote:
 

Out of the blue. Is it only one StartPage-page type in the database?

#64848
Jan 11, 2013 14:16
Vote:
 

Yeah, you're right! Got a copy of every pagetype! You really have to have control of those GUIDs, otherwise you'r screwed it seems.

#64864
Jan 13, 2013 22:59
Vote:
 

Hehe yeah, been there done that.

Either add GUID information to pagetype classes so it links to the correct pagetype, or you could start converting pages to the new pagetype you just created. Adding GUIDs is always a good idea anyway...

#64886
Jan 14, 2013 15:42
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions 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.