X

Register now for unlimited access to Sitecore resources.


Already have an account? Log in now

*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
X

Request a demo

It’s easy to get started. Sign up for a personalized demo.

*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
Sitecore Blog: @sitecorejohn blog

Important Pipelines in the Sitecore ASP.NET CMS

By John West, May 31, 2011 | Rating:  | Comments (21)

This blog post describes and links to resources about what I consider to be the most important pipelines in the Sitecore ASP.NET CMS. For more information about pipelines, see my blog post All About Pipelines in the Sitecore ASPNET CMS.

There are too many pipelines to list here, and to be honest, I don't know what all of them do. Please review the relevant section of the web.config file for more options and details.

In the /configuration/sitecore/pipelines section of the web.config file, some of the key pipelines include:

In the /configuration/sitecore/processors section of the web.config file, some of the key pipelines include:

  • <uiAddFromTemplate>: Add an item based on a data template, branch template or command template.
  • <uiCopyItems>: Copy an item and its descendants.
  • <uiCloneItems>: Clone an item and its descendants.
  • <uiDeleteItems>: Delete an item and its descendants.
  • <uiDragItemTo>: Invoked when a user drags and drops an item to move it.
  • <uiDuplicateItem>: Invoked to duplicate an item.
  • <uiMoveItems>: Invoked to move an item and its descendants.
  • <uiRenameItem>: Invoked to rename an item.
  • <uiGetMasters>: Determines the insert options allowed for an item. Update 29.March.2012: for more information about insert options see the blog post All About Insert Options in the Sitecore ASP.NET CMS.
  • <loggingin>: When logging in.
  • <loggedin>: After login. For an example of a <loggedin> pipeline processor, see my blog post Randomize Sitecore Desktop Background Image. Update 8.Feb.2013: and Automatically Show the Quick Info Section in the Content Editor of the Sitecore ASPN.ET CMS.
  • <logout>: Implements logout.
  • <saveUI>: When a CMS user saves an item.
  • <uiUpload>: Upload a media item.

Tags: API, Architecture, Infrastructure

Comments

  • Hi John

    Is there any official Sitecore documentation on the pipelines, when they are fired and in what order?

    Aside from this blog article and a few others on the web, I have not been able to find much info in this. Seems like most people seem to trial and error with guess work. Seems a bit crazy not having this officially documented, kinda like Microsoft saying "we're not gonna tell you what the page lifecycle is, have a stab in the instead" :)

    - Kamruz Jaman
    February 09, 2012 at 7:43 AM

  • @Kamruz: The short answer is no, Sitecore provides no such documentation. I have longer answers, but I don't think they add any specific value to this discussion. You are welcome to ask me questions on this topic, but I can never be sure of my answers, especially as some details change between versions, and some of the calls to pipelines are in obfuscated assemblies. One tip I can suggest is to add a processor to a pipeline and log the stack trace - sometimes that will explain what calls it. You can also use a tool like .NET Reflector and search for the name of a pipeline within the code (the third button/toggle after the search field - not searching for a class name, not searching for a member name, but searching in the code for a token, where that token is the name of the pipeline). It may be unfortunate, but these are honestly the techniques that I use.

    - John West
    February 15, 2012 at 2:28 PM

  • Seems to be the same technique that I am using too :)

    Except that it is very buggy and time consuming having to trial and error this every time! This *really* should be documented. Can this be raised with someone to create some documentation around this?

    - Kamruz Jaman
    February 17, 2012 at 4:31 AM

  • @Kamruz: The footer of every page on at http://sdn.sitecore.net provides an email address that you can use to request things like this from the documentation team. I recommend that you send a message there, and if you don't get any kind of commitment, contact a Sitecore rep for your region using http://www.sitecore.net/Company/Contact.aspx. Without some pressure from the community, I don't think Sitecore will prioritize this effort.

    - John West
    February 17, 2012 at 8:05 AM

  • Thanks John, I'll get a few people to email them :)

    I think there is a lot of potential in the pipelines, and having some concrete documentation would help open up a world of possibilities for everyone since we would then understand (and know about) the different events.

    - Kamruz Jaman
    February 17, 2012 at 8:47 AM

  • What Invokes This Pipeline in the Sitecore ASP.NET CMS? http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2012/04/What-Invokes-This-Pipeline-in-the-Sitecore-ASPNET-CMS.aspx

    - John West
    April 30, 2012 at 12:59 PM

  • John - I have an interesting use case from a customer - they want to perform a bulk file upload that will (1) extract some meta data about the file from the filename, and (2) create permissions on the items based on the meta data...there will likely be a "confirmation" screen that appears after the upload is complete. Is there a way to plug into the pipeline for the advanced file upload and perform these actions?

    - Brian Beckham
    May 17, 2012 at 7:05 AM

  • Ok, so I got through the first part...creating an item template an adding the fields I needed, then plugging into the pipeline to retrieve the data and create the custom item.....I am still struggling with the confirmation screen to display after the save is processed...can you point me in the right direction?

    - Brian Beckham
    May 17, 2012 at 11:11 AM

  • @Brian: To be honest, I am not very familiar with the uiUpload pipeline. It would probably be better to look into this on the SDN forums so that we can attach code and post links and more than 2,000 characters. Can you describe the problem here and comment on this blog post with a link to that post?

    http://sdn.sitecore.net/SDN5/Forum/ShowForum.aspx?ForumID=10

    - John West
    May 20, 2012 at 9:34 AM

  • Information about MVC Pipelines:

    http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2012/06/Posts-about-Using-MVC-with-the-Sitecore-ASPNET-CMS.aspx

    - John West
    June 19, 2012 at 10:16 AM

  • Awesome blog! Good info and right to the point. I really enjoy this site! I also have a blog, but for me it is just the beginning. Please, come to visit my site. Maybe you will like it.

    - Mining services
    July 16, 2012 at 2:45 AM

  • Im obliged for the post.Really looking forward to read more. Really Great.

    - a email@gmail.com
    October 20, 2012 at 12:44 PM

  • TNHLdk Thank you for your blog post.Thanks Again.

    - howardlee@gmail.com howardlee@gmail.com
    November 04, 2012 at 11:01 PM

  • Not as much information as here, but just realised a document about pipelines was added to SDN:
    http://sdn.sitecore.net/Reference/Sitecore%206/Sitecore%20Pipelines.aspx

    - Kamruz Jaman
    February 19, 2013 at 6:45 PM

  • Is there a bulk update option in sitecore or will one be available soon? If not, what is the recommended bulk updater tool that works well with sitecore. Such as needed to tag 15 different files with same update, or being able to delete the same tag in 20 different files all in the content tree?

    - Jessica Bassett
    April 12, 2013 at 11:21 AM

  • @Jessica:

    I'm not aware of any tool specific to that purpose. I would consider Sitecore Rocks for this, maybe Query Analyzer.

    http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2012/09/Sitecore-Rocks-Query-Analyzer-Ingredients-for-the-Sitecore-ASPNET-CMS.aspx

    I think I've seen similar things solved with Revolver and Powershell:

    http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2012/11/Scripting-the-Sitecore-ASPNET-CMS.aspx

    - John West
    April 12, 2013 at 1:13 PM

  • Another renderField example:

    http://sitecorejunkie.com/2014/03/30/embedded-tweets-in-sitecore-a-proof-of-concept/

    - John West
    March 31, 2014 at 6:21 AM

  • Is there something like a kicked/lastsessionclosed pipeline?
    I want to clear locks on all items on logout, but when a user gets kicked instead of logged out, the logout pipeline isn't triggered.

    I think two logout-Pipelines would be nice: One for regular logouts, one for irregular logouts (e.g. kicking, timeout). As - to my knowledge - there is no "irregular logout pipeline", cleaning up after users that didn't properly logout isn't as straightforwarded as it could be.

    - Jan Bühler
    July 23, 2014 at 10:29 AM

  • @Jan: Not to my knowledge; I think you might actually want to override the kick page. It could invoke a pipeline, but that might be overkill for this requirement (although I agree that it would be nice if Sitecore exposed a pipeline rather than requiring the override).

    - John West
    July 23, 2014 at 3:03 PM

  • Another question:
    How do I call pipelines? I want to logout idle user with custom conditions, and got so far as:

    Sitecore.Pipelines.Logout.LogoutArgs args = new Sitecore.Pipelines.Logout.LogoutArgs();
    CorePipeline.Run("logout", args);

    But all I get is:
    Exception: System.InvalidOperationException
    Message: Could not get pipeline: logout (domain: )
    Source: Sitecore.Kernel
    bei Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)

    I tried "Logout" as well, but same story.
    Sitecore.Security.Authentication.AuthenticationManager.Logout() doesn't work either (using a Userswitcher). Removing a session from DomainAccessGuard.Sessions isn't having any effect as well, and when I try to manually call the logout processors (which is a very ugly solution) I get a nullreference exception in the Checkmodifiedprocessor…

    - Jan Bühler
    August 08, 2014 at 1:28 AM

  • I would try something like this:

    LogoutArgs args = new LogoutArgs {
    RedirectUrl = //whatever
    };

    Security.Logout(args);

    This calls:

    Context.ClientPage.Start("logout", (ClientPipelineArgs) args);

    I think the difference is "server" pipelines (under /configuration/sitecore/pipelines in web.config) vs. "client" pipelines (under /configuration/sitecore/processors).

    Because you are trying to log out a user other than the context user, I am not sure this will work, or maybe you have to set additional properties in LogoutArgs. If it does not seem to work easily and automatically, then I recommend that you look through the logout processors to see if any affect the context user rather than the user you want to log out. If so, I doubt that wrapping your code in a UserSwitcher would resolve the issue - I think you would have to find some other approach (possibly by contacting Sitecore customer service).

    Please post anything further you find about this issue.

    - John West
    August 08, 2014 at 10:41 AM

*{0} must be filled in.
*{0} must be filled in.
*{0} must be filled in.
Cookies help us improve your website experience. By using our website, you agree to our use of cookies. OK Learn more