Git Product home page Git Product logo

Comments (5)

Shazwazza avatar Shazwazza commented on August 17, 2024

I know we've talked about doing this for a while but there still seems to be some inconsistencies about this:

  • We still require this internally for the IMembershipMemberService with the SaveWithoutEvents
  • It seems the package service still requires the bool raiseEvents overloads

Then the main question (for example) is as a developer: how do I use the ContentService.Saved event to re-save the item and not cause an infinite loop? I know in most cases the answer is "dont" and use the Saving event to modify the data before it's persisted, but this will definitely happen and i know many devs are doing something like this today.

Is it possible to do this with a more consistent approach with some sort of scoping? Just as an API usage example:

using (EventScope.DisableEvents)
{
    memberService.Save(member);
}

from umbraco-cms.

zpqrtbnk avatar zpqrtbnk commented on August 17, 2024

Very valid concerns indeed. I "just" removed the raiseEvents parameter but forgot about that loop thing. And did not spend time on the package service at all. Of course an API-level solution (either, "disable events" or...) looks nicer. Kill this PR, will try again?

from umbraco-cms.

zpqrtbnk avatar zpqrtbnk commented on August 17, 2024

Right... the "right" way to do it ie either to disable events for a short while (but it has other problems, such as new events that should trigger) - or find a way to register what's happening in some sort of context, so ppl can determine whether they've already processed a given item.

=> requires thinking, design, whatever - moving back to backlog

from umbraco-cms.

azure-devops-sync avatar azure-devops-sync commented on August 17, 2024

This item has been added to our backlog AB#1279

from umbraco-cms.

umbrabot avatar umbrabot commented on August 17, 2024

Hiya @zpqrtbnk,

Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more.

We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed).

To open it this issue up again, you can write @umbrabot still relevant in a new comment as the first line. It would be super helpful for us if on the next line you could let us know why you think it's still relevant.

For example:

@umbrabot still relevant
This bug can still be reproduced in version 8.9.0

This will reopen the issue in the next few hours.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

from umbraco-cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.