Copied to clipboard

Flag this post as spam?

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


  • Stephan 3 posts 23 karma points
    Jan 25, 2011 @ 11:20
    Stephan
    0

    cmsContentXml out of synch

    I will start apologize for double posting, but I posted an add-on to a 7 weeks old post: http://our.umbraco.org/forum/developers/api-questions/15465-Regenerating-cmsContentXml-table

    My problem is, that in the backend content tree I see 10 child items of my home-item. But when I go to the Sort dialog, I see 15 items.

    I have investigated the issue, and it seems that the Sort dialog uses the CMSNode.Children property to list the nodes, which executes this sql:

       "SELECT * FROM umbracoNode where parentID = 1066"

    The statement above returns 15 nodes.

    The content tree on the other hand, seems to be using the umbraco.config file, which is based on the cmsContentXml table in the database. Deleting the file will cause the generation of a new one, but this one will still contain only 10 child nodes. When I join umbracoNode with cmsContentXml, I only receive 10 nodes:

    SELECT * FROM umbracoNode JOIN cmsContentXml
    ON cmsContentXml.nodeId = umbracoNode.id where parentID = 1066

    The statement above returns 10 nodes.

    This means, that umbracoNode contains 5 nodes with parent id 1066, which do not exist in the cmsContentXml.

    I am using umbraco version 4.5.2.

    Does anyone have a solution for this problem? Has it been fixed in later releases? Or can I cleanup the problem someway?

    Thankyou in advance.

     

     

     

  • Gerard 20 posts 77 karma points
    Jun 07, 2011 @ 15:10
    Gerard
    0

    Hi Stephan,

    I had the same problem and found this article:

    our.umbraco.org/.../publishing-and-republishing

    In the article, there is an umbraco URL that will rebuild the XML cached data:

    http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?xml=true and clicking "republish"

    Could you please give this a try?

  • daveb.84 21 posts 46 karma points
    Oct 14, 2011 @ 14:19
    daveb.84
    0

    I've just experienced a similar problem to this, where by the XML in the umbraco.config file and cmsContentXml database table were out of sync with the umbracoNode table.

    What I had was multiple entries in the XML with parentID="-1" (incorrect) when their corresponding rows in the umbracoNode table had the parent as "1262" (correct - as was being displayed in the umbraco content tree).  The cause of this was some manual tinkering in the database after accidently deleting the document type of my root node, hence deleting all content from the database.

    I tried to manually change the XML in the database to be parentID="1262" but whenever I rebuilt the XML using the above link, the XML switched back to -1. 

    The Solution:

    On further inspection, the problem was that the "level" column of the umbracoNode table had the value of 1 when it should be 2.  When I updated this column to 2, the XML regeneration worked properly.  It seems that the level column in the umbracoNode table takes precedence over the parentID.  So if level is incorrect, it pulls out the wrong parentID.

    The major bummer to this was that all children of these nodes also had the wrong level value.  I ended up doing a copy of all the incorrect nodes, then moving all of the children to be children of the newly copied nodes.  This caused the nodeIDs to change for the newly copied node, but the children to have their nodeIDs preserved and their level values to update correctly.

    So if anyone gets the situation where the XML has incorrect parent/level values, check that umbracoNode table has the correct data - parentID AND LEVEL.  Once that's all sorted, refresh the XML with http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?xml=true and you should be ok.

  • ... 20 posts 41 karma points
    Aug 22, 2013 @ 10:35
    ...
    0

    I'm experiencing this on v4.8.0 and I'm sad to say that using Umbraco/dialogs/republish.aspx?xml=true only worked once, the first time we used it.
    It hasn't worked since, and the issue persists.

    Seems to be on nodes that include attached media.

Please Sign in or register to post replies

Write your reply to:

Draft