ContentData cast of pagetype is not compatible

Mathias Frodin
Member since: 2008

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
  • Erik Nordin Wahlberg
    Member since: 2004

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

    #64848 Jan 11, 2013 14:16
  • Mathias Frodin
    Member since: 2008

    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
  • Daniel Ovaska
    Member since: 2005

    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