public abstract class PageTypeBase : TypedPageData
public class StartPageData : PageTypeBase
*come down to the fact* not face... :)
I'd like to point out that I think this may be a pointless exercise trying to get these web parts working. They just seem to be demo web parts to get developers started and examples of what's available through the web services, and shouldn't be installed live as part of the "Connect for SharePoint" product. (They are like Public Templates to EPiServer CMS?) This may just require me to go back to my project manager to try and force this point home.
Any pointers would be helpful though.
This all sounds really weird! Could you post some more details about the error (stack trace and anything else you could think of) or e-mail them to me (firstname.lastname@example.org)?
Hi Joel, thanks for getting back to me.
After quite a lot of messing about with serverly slow VPNs, remote desktops and recompiling the EPiServer Web Parts, I've finally got you a useful error... maybe. (See below the break)
Since this error only occurs when I have a base page type class (even with no properties in the base class) it doesn't make much sense. It's definitely serialization as I thought it would be, but it doesn't make it any clearer to why it's happening.
I wouldn't spend any time on this unless you really want to. If you want to replicate my install, all I have is the following:
EPiServer 6.0SharePoint 2007 (+ SharePoint Connect)
Custom Page Type inheriting from Base Page Type - Base Page Type inheriting from TypedPageData (blank class, no 'base' page properties to simplify conditions)
Create a page with the custom page type within the root of the website. Then attempt to browse the page tree with one of the SharePoint web parts.
Removing the base page type and change Custom Page Type to inherit directly from TypedPageData fixes the problem.
System.InvalidOperationException: There is an error in XML document (1, 99208). ---> System.InvalidOperationException: Instance validation error: 'LinkCollection' is not a valid value for PropertyDataType. at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPageStoreService.Read5_PropertyDataType(String s) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPageStoreService.Read7_RawProperty(Boolean isNullable, Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPageStoreService.Read9_RawPage(Boolean isNullable, Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPageStoreService.Read17_GetChildrenResponse() at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer8.Deserialize(XmlSerializationReader reader) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object parameters) at EpiServer.SharePointWebParts.PageStoreService.GetChildren(PageReference pageLink, LanguageSelector selector, Int32 startIndex, Int32 maxRows) at EpiServer.SharePointWebParts.WebPartBase.GetChildPages(Int32 parentId)
I guess you have a PropertyLinkCollection as one of your properties. That is one of the properties that ToString() is not the underline store string. You can't do ParseToSelf(ToString())
Not looking at your code, it can be that you serilize in the PageTypeBuilder context the value, and when you try to use it it tries to do a ParseToSelf
It seems, Anders, that you are (mostly) correct!
I don't know why I didn't spot this during my testing yesterday, I thought I was getting the error even when I removed all "complex" properties just leaving strings, but my testing was obviously flawed. Today when I remove all instances of the PropertyLinkCollection from my page type, the error does not occur.
Sorry for my misleading results in previous posts, they completely threw me into a completely different line of thought.
SO... : I've now done some proper testing and proved that the PropertyLinkCollection is the culprit. To solidify this even further, I started up a new PublicTemplates sample site, modified the content page type adding a PropertyLinkCollection property (within the Admin) then viola - the error appears within SharePoint.
Since I can replicate this without using PageTypeBuilder at all, it doesn't appear to be causing any problems (Joel, you can relax).
This appears to be a problem with any page type (created manually or with PTB) using PropertyLinkCollection.
The error occurs with no custom code (other than to query the web service) so this should be seen as a bug with PropertyLinkCollection, right?
Thanks for your input guys.
Cool that you found the source of your error
I quess you can make your own propertie and mark all properties with noserilize and have one field that looks something like this. (Haven't tried it thou)
public string MyValue