Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Dingley 1470 posts 3427 karma points c-trib
    Oct 26, 2011 @ 08:24
    Simon Dingley
    0

    Cannot convert document type 'x' to document type 'y' or document type not found. Node id: '1125', node name: 'xxx'

    When trying to access a protected page on the site before being logged in the exception:

    Cannot convert document type 'x' to document type 'y' or document type not found. Node id: '1125', node name: 'xxx' is thrown? Why would it be trying to convert a document type?

  • Vladan Ostojic 94 posts 210 karma points
    Oct 26, 2011 @ 09:21
    Vladan Ostojic
    0

    Can you paste the line of the code where this is happening? It's happening probably because you are trying to convert an Umbraco content (whose node id is 1125) to an instance of your document type ('y') but that node (1125) is not of 'y' document type but 'x'.

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Oct 26, 2011 @ 20:53
    Simon Dingley
    0

    Sorry for the delayed response. There wasn't actually any document conversion going on which is why it was a bit confusing. It turns out the Login Page specified for the protected nodes didn't exist but still not entirely sure why that resulted in this exception.

  • Vladan Ostojic 94 posts 210 karma points
    Oct 27, 2011 @ 09:22
    Vladan Ostojic
    0

    This exception can also happen if your strongly typed template renders wront document type. If you, for instance, declare your template as:

    ..MyTemplate: TemplateBase<MyDocumentType1>..

    and then declare your MyDocument2 as following:

     

    [...DefaultTemplate="MyTemplate"]    (or you add it to allowed templates)

    MyDocumentType2...

     

    When MyTemplate is set as a render template for some Umbraco content of MyDocumentType2 you'll also get this exception as template will try to convert MyDocumentType2 to MyDocumentType1.

    So without more details it's hard to know what exactly happened.

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Oct 27, 2011 @ 21:04
    Simon Dingley
    0

    When I get a chance I'll see if I can reproduce the problem on a clean install and report back.

    Thanks, Simon

Please Sign in or register to post replies

Write your reply to:

Draft