Copied to clipboard

Flag this post as spam?

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


  • Ricardo Marcelino 15 posts 73 karma points
    Dec 14, 2011 @ 20:15
    Ricardo Marcelino
    0

    Shuffling nodes on Parent + Childs publishing, even if not referenced in the .config

    Hello,

    First of all let me give my thanks for this tool. It's very handy when managing news articles!

    Anyway, i've encoutered a problem.

    In my documentSorter.config I only have one <add>, for my news. What happens is that when I re-publish the main node of my website (including all the childs), it shuffles all the nodes, in no identifiable pattern, even though they aren't news (not referenced in my .config in other words). That behavior stopped when I removed the package from my website.

    The pattern is not identifiable but it's always the same, when I re-order and re-publish.

    Using Umbraco 4.7.1 with T-SQL.

    Thanks :)

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 14, 2011 @ 21:28
    Tom Fulton
    0

    Hi Ricardo,

    Can you paste your <add> key here from documentSorter.config?

    Also just to clarify, when you save/publish the root node of your site, the sort order changes for pages that aren't in your news section or of the news doctype?

    -Tom

  • Ricardo Marcelino 15 posts 73 karma points
    Dec 14, 2011 @ 21:41
    Ricardo Marcelino
    0

    Hello Tom! Here's my .config:

    <add docTypeAlias="Noticia" field="dataNoticia" type="Date" order="Desc" disableTreeRefresh="false" >

    And to better describe, nothing better than a picture:

    So, my pt is my homepage. Noticias and children are docTypeAlias="Noticia".

    When I right-click on pt to publish all pages (not including unpublished children), what happens an order like this:

    • Noticias
    • Ideias
    • Sabor
    • Fruta
    • Natureza
    • Favoritos
    • [...]

    No direct interaction with news nodes.

    Any further explanation, please shoot away :)

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 14, 2011 @ 22:09
    Tom Fulton
    0

    Thanks for the detailed info, that really helps :)  I was able to reproduce the problem here...

    The problem is that it's also trying to sort the parent 'Noticias' node, which you probably don't want.  I think most developers create a different doctype for their containers, such as Noticias Area or Folder - Noticias.

    But anyway, you can use the rootXpath parameter to specify that sorting should only happen on the child Noticias nodes. The below will make sure sorting happens when the parent of the node to sort is of type Noticia:

    <add docTypeAlias="Noticia" field="dataNoticia" type="Date" order="Desc" disableTreeRefresh="false" rootXpath="//Noticia"/>

    Make sure to touch your web.config for the changes to apply.

    Hope this helps,
    Tom

  • Ricardo Marcelino 15 posts 73 karma points
    Dec 16, 2011 @ 12:33
    Ricardo Marcelino
    0

    Hello Tom!

    Added the rootXpath to my key, and indeed it didn't dare to move my other nodes around! 

    Thank you very much for your help!
    Ricardo 

Please Sign in or register to post replies

Write your reply to:

Draft