Copied to clipboard

Flag this post as spam?

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


  • Simon Radford 5 posts 25 karma points
    Feb 06, 2014 @ 11:53
    Simon Radford
    0

    Umbraco.config deleted when moving nodes

    Hello,

    I'm working with a very large site (around 20,000 nodes) that's running on Umbraco 4.11.10. The Umbraco.config file is currently around 27 MB.

    The high number of nodes on the site is the result of bad design decisions made by the original developers, that we have no control over. We inherited the code base while the site was in a bad way, running on 4.0.2, with the XML cache being corrupted on a frequent basis and crashing the entire site. To remedy the situation we scourged the database of illegal hexadecimal characters and upgraded the site to 4.11.10.

    I thought all was well until the last few days, where I have found that when moving nodes around the site, the Umbraco.config file is deleted, and then recreated with only the published nodes that were moved. Looking at the umbracoLog table in the database shows no errors.

    I have also noticed that attempting to sort nodes frequently fails, again with no errors recorded in the log.

    Usually, most people suggest rebuilding the umbraco.config file in situations like this, but unfortunately this isn't a viable option because of the high number of nodes. We had to do this when the site was upgraded and it took pretty much a whole day.

    If anyone could offer any explanation of why this is happening, or possible solutions, that would be greatly appreciated (with the exception of the rebuilding the entire site, which unfortunately is not an option!)

    Thanks,

    Simon R

     

  • Simon Radford 5 posts 25 karma points
    Feb 20, 2014 @ 11:17
    Simon Radford
    0

    I have eventually managed to solve this problem by myself. I am suprised that nobody could offer any help at all, given that this is supposed to be the Umbraco forum. I'm leaving this information here in case anybody else has a similar issue.

    Looking through the source code reveals that after moving a content node, the RefreshContentFromDatabaseAsync() method gets called. This is the same method that gets called when you use the "Republish Entire Site" option from the top node of the content tree. I found that when I used that option, the same problem occurs.

    This method retrieves all the content XML from the cmsContentXml table and compiles it to generate the complete Umbraco.config XML file. What was happening, was that there were certain key nodes that did not have entries in the cmsContentXml table (or at least they were not being retrieved by the script that is used to get them). Therefore, when the Umbraco.config file was rebuilt, it was incomplete because it couldn't build the entire node structure.

    I still have no idea why these nodes were missing the XML, as they would have been present in the past in order to build the current Umbraco.config. In any case, I needed to republish all nodes and rebuild the XML entries in the database. I was not happy about doing this as it takes such a long time on this site, however it doesn't look like this affects the running of the live production site, so in the end this was not a big problem.

    At the same time as doing this I also had to...

    - Run a special script to empty the recycle bin (it contained around 1200 items and would not empty without hanging)

    - Use the same script to clear spam nodes that were created under blog posts as comments, and added a captcha mechanism to the form to stop the spam nodes getting created there in the future. This was a complete oversight by the previous developers and the blog should not have been allowed to get into this state!

     

    I am not particuarly happy with Umbraco after this experience, although the majority of my frustration is aimed towards the previous developers who obviously had no idea of what they were doing, or any understanding of how Umbraco really works.

     

     

Please Sign in or register to post replies

Write your reply to:

Draft