Copied to clipboard

Flag this post as spam?

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


  • Steve McGill 6 posts 57 karma points
    Mar 29, 2013 @ 12:29
    Steve McGill
    0

    generating umbraco.config with duplicate nodes - is my data corrupt? v4.9 -> v6.0.3

    There's something in my data which is causing the ouput of umbraco.config to be corrupt, nodes are showing up twice or otherwise out of place, not within its parent node.

    This leads to errors of nodes showing up twice in ChildrenAsList, and GetNode() not finding a node at all even though it's visible in umbraco.config.

    When I do "Republish entire site" the homepage node is written twice which makes the site crash with currentNode not found (even though currentNodeId is correct). When debugging and I try and use uQuery I indeed fail to retrieve the node by that ID.

    I have examined the database and checked that all the constraints are enabled and satisfied. I tried cleaning up all old versions and their properties. The nodes only show up once in umbracoNodes cmsContent cmsContentXml.

    I've tried publishing an item and all child-items, and also unpublishing everything and then re-publishing.

    I am at a loss and I don't really know what to look for now. And short of providing the entire database I don't know what information to provide, but here are the basics:

    Version: was 4.9, now 6.0.3. I have a feeling the data corruption already existed in v4.9 as I have been confused by nodes showing up twice before.

    .NET 4.5 on my local Windows 7 + IIS 7.5 machine

    I'm going to download the Umbraco source now to try and examine how creating umbraco.config works, but in the meantime, does anybody have any advice on how I can find what's wrong in the data?

    Thanks in advance,
    Steve

  • Steve McGill 6 posts 57 karma points
    Mar 29, 2013 @ 16:49
    Steve McGill
    0

    I have narrowed it down to this error in the logs:

    ERROR umbraco.cms.businesslogic.web.DocumentType - [Thread 6] Exception while trying to build DTD for Xml schema; is Umbraco installed correctly and the connection string configured?

    The DTD is indeed empty, and is no doubt the root cause of the duplicates too.

    I still can't find out what the problem is as the connection string is OK, rest of the umbraco.config is fine when completely regenerating it, only the DTD is wrong.

    Steve

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Mar 29, 2013 @ 17:45
    Tom Fulton
    0

    Unfortunately I haven't seen this before, but at least you're getting an error message - your best bet might be to debug from the source if you have that option.

  • Steve McGill 6 posts 57 karma points
    Mar 29, 2013 @ 18:15
    Steve McGill
    0

    ApplicationContext.Current.Services.ContentTypeService.GetAllContentTypes() contains a null value in the collection which then causes the constructor of CMSNode to error.

    Almost there!

  • Steve McGill 6 posts 57 karma points
    Mar 29, 2013 @ 19:14
    Steve McGill
    101

    This all boiled down to an orphaned node in umbracoNodes - I really don't know how it got there.

    Can be identified with the following SQL:

    SELECT * FROM umbracoNode
    WHERE nodeObjectType='A2CB7800-F571-4787-9638-BC48539A0EFB'
    AND id NOT IN (SELECT nodeId FROM cmsContentType)


    24 hours to end up deleting one row in the database. Sigh. At least it led me to experiment checking out the Umbraco source and debugging etc.

    This is exactly the reason I'm not a big fan of a huge try/catches which do nothing but log the error somewhere.

    Thanks for reading and more importantly thanks for Umbraco!

    Steve

  • Chris van Dam 15 posts 27 karma points
    May 13, 2013 @ 11:27
    Chris van Dam
    0

    @Steve: You rock. I had exactly this problem after upgrading from 4.6 to 6.0.5. Spent a lot of time figuring out what went wrong. My cache just kept containing different versions of some pages which really messed up my menus etc.

     

    It wasn't until I read your post that I was able to solve this.

     

    Thanks man

     

    Chris

  • Glenn 28 posts 101 karma points
    Aug 15, 2013 @ 03:00
    Glenn
    0

    I have the same problem after upgrading a site from 4.7.2 to 6.1.3. 

    You mentioned that you just need to run the query (listed by Steve in his post). However I presume I should find out what my missing id is. Any ideas how to do this? Or are you saying that exact id is the one that is actually the guilty party?

  • Chris van Dam 15 posts 27 karma points
    Aug 15, 2013 @ 12:25
    Chris van Dam
    0

    Hi Glenn,

    If I recall correctly, this just reports the nodes that are 'stuck in limbo'. In my case I believe it was an old version of a page that was somehow disconnected from the root. When I deleted this inaccessible and redundant page everything was magically back to normal.

    However, I'd check if your resultset of the query does indeed only contain old stuff, or you might delete something that's not supposed to be!

    Good luck,

    Chris

  • Funka! 398 posts 661 karma points
    Sep 10, 2013 @ 19:51
    Funka!
    0

    I also went the upgrade-path starting with a very basic 4.11.8 site with only a few nodes in it, to 6.1.3.

    I've gotten some weird corruption issues on umbraco.config as well, with partially duplicate nodes in wrong places, etc. This also corresponded with getting a lovely "Oops: this document is published but is not in the cache (internal error)" error when trying to publish a new page. And also MNTPs stopped working. Fun!

    This is not a complicated site at all, I've built plenty others much more complex than this and never yet seen this, although I have only recently started with v6 so who knows. Maybe the common problem here is in the upgrade. So far I've "fixed" this each time by stopping IIS, deleting the cache file, and restarting IIS. And then republish the entire site just for good measure. But as this has happened twice so far I'm not confident the problem won't return.

    I did try Steve's suggestion to look for orphaned nodes in the database while the problem was actively occuring, but none were found. I've also attached a screenshot showing what my corrupted umbraco.config cache looked like. Not sure what might explain why this happened.

    Screenshot of corrupted umbraco cache

  • julius 107 posts 289 karma points
    Jan 15, 2014 @ 22:39
    julius
    0

    I ran into the same problem and I think I solved it by emptying the recycle bin.

Please Sign in or register to post replies

Write your reply to:

Draft