Copied to clipboard

Flag this post as spam?

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


  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    May 19, 2016 @ 10:45
    Chris Houston
    0

    Most efficient way to re-publish multiple nodes that don't all belong to the same parent.

    Hi All,

    I have recently inherited a client project that IMHO has been structured badly, but it is what I need to work with for now.

    They have a structure like this:

    Topic >  Question > Country (which has a single answer property)
    

    I have created a custom section within Umbraco that allows my client to view their tree structure in this format:

    Country > Topic
    

    When a topic is selected they can then see a single edit page with all the "Country" answers for all the questions and when they click save it updates all the appropriate nodes, this is all good.

    My "issue" is that they would also like to "re-publish" an entire Country, this in effect means I need to re-publish approximately 150 nodes, cycling through this number of nodes in code to re-publish is very slow, so I wondered if there was an official way to do this kind of bulk re-publishing?

    Or if anyone had any good suggestions to make this efficient?

    Cheers,

    Chris

  • Tom Steer 161 posts 596 karma points
    May 19, 2016 @ 11:15
    Tom Steer
    0

    Hey Chris,

    I've spent a fair amount of time in the passed looking around the Umbraco source code and documentation and have never found anything efficient to handle bulk publishing unfortunately.

    When they republish a country node do all the dependant nodes have to be republished or could you check for changes first and only republish the changed ones?

    Thanks,

    Tom

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    May 19, 2016 @ 11:20
    Chris Houston
    0

    Hi Tom,

    We have to re-publish ALL the Country nodes as the "published date" is used on the front end of the website to essentially say that this content was last validated as being accurate on that date.

    I was wondering if it would be more efficient to write a SQL query and then some how trigger Umbraco to re-build it's cache and indexes?

    Cheers,

    Chris

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    May 19, 2016 @ 11:24
    Jeroen Breuer
    0

    Hello,

    Have you tried the Bulkmanager? http://soetemansoftware.nl/bulkmanager

    Jeroen

  • Tom Steer 161 posts 596 karma points
    May 19, 2016 @ 11:26
    Tom Steer
    0

    Hey Jeroen,

    Doesn't Bulkmanager just use the same Umbraco content services behind the scenes so will have the same performance issues?

    Thanks,

    Tom

  • Tom Steer 161 posts 596 karma points
    May 19, 2016 @ 11:24
    Tom Steer
    0

    Hey Chris,

    If it is always bulk approved, could you maybe just read/display the published date from the parent Country node for each answer. Probably not ideal but a possible work around rather than republishing the nodes just to update publish date.

    Thanks,

    Tom

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    May 19, 2016 @ 12:13
    Chris Houston
    0

    @Tom,

    If only it were that simple, unfortunately not as I don't have time to refactor the whole solution. The joys of taking over an Umbraco site you didn't build yourself :)

    However I am updating the country node with an approval date so in the future it can be refactored if the budget to make the improvement is agreed.

    @Jeroen

    Bulk manager would not work for this client's solution, this is a custom built section in Umbraco that manages their workflow. Due to the structure of the Umbraco nodes being far too inefficient for content editors to actually use.

    E.g. If you tried to update all answers for one country using the normal Umbraco structure you would have approximately 480 mouse clicks!

    Presumably the Bulk Manager does essentially do what I need, I just need to be able to do it in code. I think I will probably end up needing to write the SQL myself.

    Cheers,

    Chris

Please Sign in or register to post replies

Write your reply to:

Draft