Copied to clipboard

Flag this post as spam?

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


  • Dave Pearcey 46 posts 178 karma points
    Nov 03, 2020 @ 15:17
    Dave Pearcey
    0

    Cannot save a non-current version

    Hi!

    I'm getting an issue where I hhave content items that are very often changed from multiple sources simultaneously. There's 14,000 occurences of this in the last 24h.

    I understand the problem. User 1 and user 2 cause an update to an item at the same time. user 1 goes through fine but user 2 gets a 500 because their data is now outdated.

    Due to the nature of the content, it is a necessity that many can update a content item like this simultaneously.

    What would be a good way to go about fixing this? Is it possible to check whether the data is now outdated before calling .SaveAndPublish, and if it is outdated to then retry somehow.

    I had ready about using Guid rather than id to access content item caused the issue pre 8.3, but im in 8.7, so no longer an issue? I do think its down to multiple people causing a change, rather than a bug in umbraco.

  • Malthe Petersen 68 posts 383 karma points c-trib
    Nov 03, 2020 @ 20:07
    Malthe Petersen
    0

    Hey Dave.

    Not sure whether there is a package for this, but an awesome solution would be “locking” the content, if someone is currently editing it. So:

    User 1 accesses the content, user 2 now access the content, but cannot edit it, before user 1 leaves the content. This would be possible with SignalR. Now the good question is, should it be possible to “request” editing access from the current user and how should it be.

    But I guess the simple solution could work for you for now. It does however require some coding and some knowledge about how SignalR works and how it communicate with clients. But should be possible.

    Let me know what your solution is. :-)

  • Dave Pearcey 46 posts 178 karma points
    Nov 04, 2020 @ 11:24
    Dave Pearcey
    0

    I should have noted that this isn't within the backoffice. It's programmatic, through the API.

Please Sign in or register to post replies

Write your reply to:

Draft