19 votes
Accepted

How to avoid logging an error when aborting a pipeline

Add a magic "Ok|" string to the abort message, e.g: context.Abort("Ok|Abort pipeline", context); It turns out that the implementation of Abort checks for the magic "Ok|" string: public override ...
Joost's user avatar
  • 1,897
17 votes
Accepted

Sitecore administration page to view all pipeline processors

Yes there is. Depends on your Sitecore version but you can use: /sitecore/admin/pipelines.aspx Sitecore Pipeline Profiler page The Sitecore Pipeline Profiler page has been in from Sitecore 7 but is ...
ASura's user avatar
  • 2,363
16 votes
Accepted

Stop executing remaining processor of a pipeline

Siva Kumar answer is correct in the most simple scenario. You must know that args.AbortPipeline() doesn't really abort the pipeline. It only sets a flag and all the remaining processors will be ...
Marek Musielak's user avatar
  • 23.1k
13 votes
Accepted

What is a hook and how does it differ from a pipeline processor?

Hooks A hook is a mechanism that you can use to run or "register" some logic at initialization time. To create one, you implement the IHook interface and add the necessary configuration as determined ...
Zachary Kniebel's user avatar
13 votes
Accepted

How can I write my own custom disabler?

Sitecore's built in disablers, like the SecurityDisabler and the EventsDisabler classes, all inherit the Sitecore-provided Switcher class. This class is an IDisposable that can be used to create ...
Zachary Kniebel's user avatar
11 votes

Handle all Custom Errors in Sitecore MVC

So for Sitecore - a global error handler in the global.asax will not work properly. The better way to do it is to override the code that calls each rendering and handle the errors there. ...
Richard Seal's user avatar
  • 20k
10 votes
Accepted

Which pipeline should I patch:after my new processor so that I have access to Context.Session

You actually need to use a completely different pipeline: httpRequestProcessed. This pipeline executes after the session has been initialized. The example below is taken from this blog by Brian ...
Ben Golden's user avatar
  • 3,303
10 votes
Accepted

HttpContext.Current.Request.Url doesn't return language code

This is because Sitecore strips it out of the URL once it identifies it as a valid language code. It happens here: <processor type="Sitecore.Pipelines.PreprocessRequest.StripLanguage, Sitecore....
Mark Cassidy's user avatar
10 votes
Accepted

Run Pipeline Batch button disabled

When you create a new tenant it is disabled by default. You need to enable it. On the tenant item on Administration section you have a checkboxfield Enabled Please see below image: You can ...
Vlad Iobagiu's user avatar
  • 18.2k
10 votes
Accepted

Dependency Injection for Sitecore pipeline processor

Assuming you're running Sitecore 8.2 or later, you can add resolve="true" to the <pipeline> element to enable DI resolution for the processor. Sitecore uses Microsoft.Extensions....
Richard Szalay's user avatar
9 votes
Accepted

How can I find out why my custom `httpRequestBegin` processor is not executed?

The usual path I take when approaching these things is to use pipeline profiling. Open the pipelines.aspx page and check if your processor is there, at all. If it isn't, you'll need to review your ....
Dmytro Shevchenko's user avatar
9 votes
Accepted

Ways to block SC_ANALYTICS_GLOBAL_COOKIE from being deployed?

You can create your own class: public class ClearCookieHttpModule : IHttpModule { public void Dispose() { } public void Init(HttpApplication context) { //...
Vlad Iobagiu's user avatar
  • 18.2k
9 votes
Accepted

Sitecore.Analytics.Tracker.Current.Session.Contact Is Null

Make sure it runs before the Sitecore.Analytics.Pipelines.HttpRequest.EndAnalytics processor in the httpRequestProcessed pipeline. Otherwise, the contact is set to null in the EndAnalytics pipeline ...
Marco's user avatar
  • 995
9 votes
Accepted

Pipelines vs Event Handlers

Pipeline To me pipelines are about process. Do this, then this. Allowing you to insert and remove processes simply with patch configs. A great example of this is login user pipeline. Your pipeline ...
Chris Auer's user avatar
  • 13.1k
9 votes
Accepted

Automatically create data source's for controls when user adds page from experience editor

What you want to do is take advantage of Sitecore's branching functionality. A branch in Sitecore is basically a prebuilt item tree that will be copied and inserted where you want it. It could be one ...
Chris Auer's user avatar
  • 13.1k
9 votes
Accepted

Programmatically add log information in all renderings (controller, view) HTML

Yes, you can do it by the following way. Configuration: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <pipelines> <mvc.renderRendering&...
Tamás Tárnok's user avatar
8 votes
Accepted

Converting Address in CRM to Sitecore via Data Exchange to GeoLocation Latitude Longitude

I can suggest the following solution: You need to implement a custom field reader with a custom field converter: using Sitecore.DataExchange.DataAccess; namespace Example { public interface ...
Artem Prashkovich's user avatar
7 votes

What is a pipeline?

You can read about Pipelines on the Sitecore community docs website: http://sitecore-community.github.io/docs/pipelines-and-events/pipelines/ Pipelines are one of Sitecore’s essential integration ...
Vlad Iobagiu's user avatar
  • 18.2k
7 votes
Accepted

Advanced rendering data source criterias

Prepare for a huge wall of text here which is not tested, but should work in theory and is a perfect blog post material :) So the easiest way to do this, is to actually act to the unselectable items ...
nsgocev's user avatar
  • 762
7 votes

Passing a parameter to controller rendering through URL

I've done this before using a wildcard item for the parameter and a custom resolver processor that runs just after the ItemResolver - The ItemResolver should resolve to /sitecore/content/mysite/...
Richard Seal's user avatar
  • 20k
7 votes

MVC equivalent of SecurityCheck Pipeline Processor

Like Mark Cassidy mentioned above, <mvc.requestBegin> would be a close "equivalent". I ran into a similar situation wanting non-authenticated users to be redirected to the <site loginPage="/...
vandsh's user avatar
  • 1,651
7 votes

AntiForgery Tokens and Sitecore Development

Use two browsers: when logged in as sitecore\admin and extranet\xxx might break other things as well. Use a chrome-browser and incognito window to truly have a visitor experience. This is better from ...
Bas Lijten's user avatar
  • 1,857
7 votes
Accepted

What should I be using pipeline groups for?

In this context, domains does not refer to security domains, rather controlled area. Pipeline groups could be used for namespacing your pipelines, for example when creating custom pipelines to ensure ...
Kasper's user avatar
  • 2,156
7 votes

How to add custom code on workflow state change?

There's no pipeline or event that you can plug into in the general sense of Sitecore's pipelines and events that you see in the ShowConfig. Instead, it's driven by an Item based pipeline provider. ...
Pete Navarra's user avatar
  • 14.6k
7 votes
Accepted

Is there a way to debug an initialize pipeline processor

Yes, you can debug processors in the <initialize> pipeline the same as any other pipeline in Sitecore: set your breakpoints and attach to the w3p process from Visual Studio. The issue is that ...
jammykam's user avatar
  • 13.8k
6 votes
Accepted

Using HttpHandler and Sitecore.Context

To answer your question directly; you would need to get in after the SiteResolver. Since you need to know what site you're on, to deliver your sitemap. It sits near the top in the <httpRequestBegin&...
Mark Cassidy's user avatar
6 votes
Accepted

What is a pipeline?

Pipelines are defined in config. Sitecore's pipelines exist under: <sitecore> <configuration> <pipelines> Within a pipeline, handlers are processed in the order they are ...
Paul George's user avatar
6 votes
Accepted

Passing a parameter to controller rendering through URL

Rather than an item named product, create an item named products that represents the entire collection, and then create a child item named * to represent any individual product. Wildcard items will ...
zzzzBov's user avatar
  • 873
6 votes
Accepted

Whats the difference between /configuration/sitecore/processors and /configuration/sitecore/pipelines in Sitecore configuration?

From Sitecore documentation: Pipelines define a sequence of processors that implement a function, such as defining the Sitecore context for an HTTP request or generating a list of messages in the ...
Marek Musielak's user avatar
  • 23.1k
5 votes
Accepted

Execute custom logic whenever an item is added from a particular branch template

There are actually a few options here: Command Templates Event handlers (item:added) Pipeline processors (uiAddFromTemplate, addFromTemplate) Command Templates This is by far the simplest solution, ...
Zachary Kniebel's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible