Copied to clipboard

Flag this post as spam?

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


  • Zac 239 posts 541 karma points
    Mar 23, 2018 @ 20:47
    Zac
    1

    Publish nodes after custom property editor data types are loaded

    Note: umbraco backoffice publishing and dialog/republish won't work for our needs

    Hi,

    We're looking to republish a lot of nodes with a new custom property editor data type that we created. This data type makes some calculations and saves them to the model scope / database based on other data types on the content node. We need to run this calculation for thousands of nodes. The calculation works fine if we load the page, wait a sec for the data types to finish loading and then republish the page, however, using the backoffice republish or dialog/republish options don't allow this calculation to rerun.

    We're looking for a way to republish these nodes while allowing this calculation logic to run. We know we can achieve the same goal by directly updating the database but this calculation relies on data from disparate sources, making it hard to calculate outside of Umbraco.

    Any ideas on republishing this while allowing the custom property editor calculation to rerun would be much appreciated.

    Thanks!

  • Kevin Jump 2342 posts 14889 karma points MVP 8x c-trib
    Mar 24, 2018 @ 11:06
    Kevin Jump
    1

    Hi

    there is a publication queue package (disclaimer: i wrote it) that allows you to push loads (i.e thousands) of nodes through the publication process in the background.

    https://our.umbraco.org/projects/backoffice-extensions/publication-queue/

    this just puts all the nodes into a queue, and then calls the SaveAndPublish call on each one in turn. if you logic is trigger by these events then it might 'just' work

    If not there is an API to this so you can do it programatically where you can put items into the queue and get a callback to do any work you want on them each in turn as they are processed.

    Kevin

  • Zac 239 posts 541 karma points
    Mar 26, 2018 @ 19:17
    Zac
    0

    Hey Kevin, this won't work for our needs but thanks for the suggestion. This package looks pretty helpful and we'll check it out further in the future. In the meantime, we're just going to setup an authorizedapicontroller action to result this issue for us.

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft