Copied to clipboard

Flag this post as spam?

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


  • David Zweben 268 posts 754 karma points
    Aug 27, 2021 @ 13:39
    David Zweben
    0

    Problems with ContentService Saving and Cultures

    I am trying to set up a ContentService "Saving" event that limits certain users so that they can only save changes to certain cultures. In particular, I want to prevent these users from saving changes to the default language.

    I have a "Saving" event set up that is seeing the saved IContent node, but I can't figure out a way to detect what cultures just had (still unsaved) changes applied that works properly.

    There is a "EditedCultures" property on the IContent object, but on initial save of a published node, this will always be empty. It will show a value on the next save, so it seems like it's updated after the Saving event, making it useless for my purposes.

    There is also the e.IsSavingCulture method, but it appears that the default culture is always saved even if no changes were applied to it, making it not work for my use case.

    How would I go about detecting which cultures of a node had changes applied, inside a Saving event?

Please Sign in or register to post replies

Write your reply to:

Draft