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 ...
user avatar
  • 1,847
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 ...
user avatar
  • 2,343
15 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 ...
user avatar
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 ...
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 ...
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. ...
user avatar
  • 18.8k
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 ...
user avatar
  • 3,253
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....
user avatar
  • 24.3k
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 ...
user avatar
  • 17.7k
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....
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 ....
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) { //...
user avatar
  • 17.7k
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 ...
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 ...
user avatar
  • 12.9k
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 ...
user avatar
  • 12.9k
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&...
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 ...
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 ...
user avatar
  • 17.7k
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 ...
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/...
user avatar
  • 18.8k
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="/...
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 ...
user avatar
  • 1,847
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 ...
user avatar
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. ...
user avatar
  • 14.3k
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 ...
user avatar
  • 13.6k
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&...
user avatar
  • 24.3k
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 ...
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 ...
user avatar
  • 863
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 ...
user avatar
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, ...
user avatar

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