Questions tagged [pipelines]
Questions about working with all the Sitecore pipelines: custom processors, patching, configuring, ...
175
questions
14
votes
3
answers
2k
views
Sitecore administration page to view all pipeline processors
Is there an administration page to view all pipeline processors that are configured in Sitecore and the order in which they will execute? I'm trying to verify that my custom processor is being ...
12
votes
1
answer
2k
views
What is a hook and how does it differ from a pipeline processor?
The title says it all: what is a hook and how does it differ from a pipeline processor?
Specifically, I am looking for the following:
What is a hook?
How/when are hooks triggered?
What are hooks ...
12
votes
3
answers
1k
views
MVC equivalent of SecurityCheck Pipeline Processor
What is the pipeline processor responsible for redirecting the user to the login page if they do not have access to the page being loaded? In a Sitecore webforms solution, this is handled by the ...
11
votes
1
answer
436
views
How can I write my own custom disabler?
Sitecore ships with a bunch of disablers, like the SecurityDisabler and the EventsDisabler, but what if I want to write my own?
I have a bunch of item:saved event handlers that run but when I add a ...
10
votes
3
answers
3k
views
Pipelines vs Event Handlers
What is the difference between Sitecore Pipelines and a Sitecore Event Handlers for a specific event? When should we customise a pipeline and when should we add a new handler?
10
votes
2
answers
524
views
Advanced rendering data source criterias
Has anyone got any ideas on how to customise the “choose data source dialog” / pipelines; so that only certain items (by tag or otherwise) are available as the selectable data source?
10
votes
1
answer
369
views
Initialize service in pipeline to be available through one httprequest
We're using Sitecore 8.2, habitat.
I have a service that I need to use throughout a full HTTP Request. This service should be instantiated once (we use dependancy injection) and then be available ...
9
votes
3
answers
541
views
What should I be using pipeline groups for?
Sitecore 8 gave us all sorts of handy new tools, including the ability to group pipelines, like so:
<pipelines>
...
<group groupName="mygroup" name="mygroup">
<pipelines>
...
9
votes
1
answer
5k
views
Handle all Custom Errors in Sitecore MVC
I've edited a patched a pipeline using the following bit of code.
<sitecore>
<pipelines>
<mvc.exception>
<processor type="Sitecore.Mvc.Pipelines.MvcEvents.Exception....
8
votes
1
answer
867
views
How to avoid logging an error when aborting a pipeline
By default an error is logged when I abort a pipeline in Sitecore XC9.
For example;
context.Abort("Abort pipeline", context);
Sometimes I want to abort a pipeline without logging an error, i.e. ...
8
votes
1
answer
1k
views
Which pipeline should I patch:after my new processor so that I have access to Context.Session
This is what I am trying to do,
If the user is authenticated in sitecore, and not authenticated in external system then log out the user from sitecore.
So, here is the pipeline I use:
<processor ...
8
votes
1
answer
2k
views
Castle Windsor on Sitecore 8.2 using Glass Mapper v4
I'm trying to setup Castle Windsor for Dependency Injection in Sitecore 8.2 Solution which is using Glass Mapper v4. As noted, Castle Windsor is no longer part of Glass Mapper, and thus not included. ...
7
votes
4
answers
1k
views
Whats the difference between /configuration/sitecore/processors and /configuration/sitecore/pipelines in Sitecore configuration?
Or is it like the difference between hooks and processors? (where a hook is executed by a specific processor)
Or are processors used for non-visual/http process and are instead used for things like ...
7
votes
2
answers
3k
views
Sitecore 8.2 with Web API 2
Does anybody have any experience with Web API and Sitecore? I've got a custom database for data not managed by Sitecore, but will be presented alongside Sitecore data.
The API calls work fine when ...
7
votes
1
answer
1k
views
AntiForgery Tokens and Sitecore Development
I have set up some Sitecore extranet users (8.1.160519). I am using MVC AntiForgeryTokens for some posts. The problem is with the login form explicitly. When I am developing I am logged in as Admin ...
7
votes
2
answers
3k
views
Automatically set datasource when adding a rendering to a page
My goal is to automatically set the datasource of a rendering when an certain rendering is added to the page in the Experience Editor. Since the datasource item is created when the user adds a ...
7
votes
1
answer
2k
views
Sitecore Logged In Pipeline in Identity Server?
I've created a Two Factor Authentication. It's working by adding our custom processor before Sitecore.Pipelines.LoggedIn.Ticket. But now in 9.1 with Identity Server, it won't be triggered unless I ...
7
votes
1
answer
1k
views
ExecuteRequest is Obsolete, How should we derive from the ExecuteRequest pipeline processor?
So recently noticed a compiler warning on a custom pipeline I wrote to override what pages "Page Not Found", "Layout Not Found" get redirected to (in order to make them site specific pages in a ...
6
votes
1
answer
999
views
Sitecore.Analytics.Tracker.Current.Session.Contact Is Null
I'm currently trying to identify a contact using
Sitecore.Analytics.Tracker.Current.Session.Identify(user)
and an exception keeps being thrown
"this.Contact should not be null".
Debugging ...
6
votes
2
answers
4k
views
ERROR Could not run the 'getMediaStream' pipeline for 'x' when loading images
I have an issue where our custom pipeline which crops images is not running correctly for some images. It was working fine and still seems to work correctly for the existing images but for new images ...
6
votes
2
answers
2k
views
Improving the performance of MyItems Count in Sitecore 8.1
I am trying to increase the performance of Experience Editor and one of the slowest calls is to get the number of locked items. It used to be possible to disabled this in older versions of Sitecore (...
6
votes
1
answer
1k
views
Execute custom logic whenever an item is added from a particular branch template
I am looking to run some custom logic (likely some rules) whenever an item is added from a particular branch template. How can I trigger this logic to run, in Sitecore.
6
votes
1
answer
886
views
Add custom redirect on SPEAK logout
We are using OIOSAML.NET/dk.Nita for NemLog-in (Danish National Identity Provider) as authentication mechanism for editors. Claims from the federation are mapped to Sitecore users on login, and that ...
6
votes
2
answers
293
views
Unable to get policy object when running pipeline from Startup class Config method in Commerce Engine in Sitecore Commerce 8.2.1
I created a pipeline with only one block, on the block implementation I get a Policy object, something like this:
var testPolicy = context.GetPolicy<TestPolicy>();
Condition.Requires(testPolicy)...
6
votes
1
answer
2k
views
ItemResolvers not working as expected
Using Sitecore 8.1
I have two custom ItemResolvers in my site, in this order:
ItemResolver (The sitecore default)
ProductItemResolver (Determines if a product exists for a wildcard item)
...
6
votes
1
answer
291
views
Custom AggregationProcessor : PageEventsProcessor not getting called
We have created a custom, PageEventsProcessor in Aggregation interaction Pipeline. I have added a lot of logs in that processor. That processor does not seem to be called. And there is no data in my ...
6
votes
0
answers
420
views
Disable EXM dispatch on CM and offload to DDS?
We are implementing an EXM solution for sending bulk mail, but have come across an issue in scaled environments when using a Dedicated Dispatch Server. We have offloaded all dispatch to the DDS by ...
5
votes
4
answers
6k
views
Passing a parameter to controller rendering through URL
I have a component on my page that is a controller rendering and I'd like to pass a parameter in through the URL, but not as a query string parameter. So, instead of site.com/product?id=123, I want: ...
5
votes
2
answers
7k
views
What is a pipeline?
In the Sitecore configuration, I see a lot of different nodes under the <pipelines> element. I have been through the Sitecore Certification course and don't recall us covering these in detail?
...
5
votes
2
answers
3k
views
Ways to block SC_ANALYTICS_GLOBAL_COOKIE from being deployed?
Because of EU legislation, sometimes you have to block tracking cookies from being deployed. In Sitecore's case this would mean the SC_ANALYTICS_GLOBAL_COOKIE, since it's not absolutely necessary for ...
5
votes
1
answer
598
views
Alternatives to using custom pipelines for improved unit testability
What are common or effective approaches for making Pipelines in Sitecore unit testable? I recently updated some code to use custom pipelines and then found I could no longer unit test it :-(
In the ...
5
votes
1
answer
759
views
Getting an instance of BaseCorePipelineManager
In the Sitecore doc Configuring Federated Authentication there are instructions to generate the URL links to initiate Federated Auth -- the lines are:
using Sitecore.Pipelines.GetSignInUrlInfo;
/*
[.....
5
votes
1
answer
548
views
How do I add some JavaScript at the bottom of every layout using a pipeline?
I'm wanting to add some JavaScript to the bottom of every page, but I don't want to add it to the layout(s), so I'd like a way of doing it with a pipeline (or similar).
I've tried a few of the MVC ...
5
votes
1
answer
310
views
Accessing Application_PostAuthorizeRequest via pipeline
I'm working on a scenario that requires I use session state in API calls. I found an article that discusses the setup, https://www.c-sharpcorner.com/UploadFile/dacca2/web-api-with-ajax-handle-session-...
4
votes
2
answers
2k
views
Stop executing remaining processor of a pipeline
Suppose i have 5 processor in a custom pipeline. I want to abort the execution of remaining processor if certain condition is satisfied in one of the processor.
4
votes
3
answers
2k
views
How can I find out why my custom `httpRequestBegin` processor is not executed?
I have inherited a Sitecore website with a public class named GatedPageResolver that inherits the Sitecore.Pipelines.HttpRequest.HttpRequestProcessor class and adds code to look for a Boolean check ...
4
votes
1
answer
3k
views
Dependency Injection for Sitecore pipeline processor
We are using Castel windsor for DI in our Sitecore solution. Though we haven't done any IOC registration using Sitecore pipelines, It still resolves the Controllers. I'm fine with it. But the same is ...
4
votes
1
answer
774
views
Automatically create data source's for controls when user adds page from experience editor
Hello I'm trying to override the AddFromTemplate pipeline to manually create datasources for the components inside the template that i'm using.
What I would like to accomplish
When a user clicks the ...
4
votes
1
answer
355
views
Converting Address in CRM to Sitecore via Data Exchange to GeoLocation Latitude Longitude
I have a task to convert the address that was Synced from CRM into Sitecore item upon running the Sync in Data Exchange. I am new to this feature of Sitecore and was thinking of creating a pipeline ...
4
votes
1
answer
1k
views
How to add custom code on workflow state change?
Is there a pipeline / event available which I can plug into to execute custom code when workflow state changes for any item?
4
votes
2
answers
661
views
Which pipeline is used to change the workflow state internally?
We are trying to add in additional code everytime an item moves into Editing state of the workflow.
When does this happen? Would I add this code on item save? Version added?
Admin users usually dont ...
4
votes
1
answer
482
views
Data Exchange Framework delete records in Sitecore if does not Exist in Source(CRM)
Just noticed the behavior of Data Exchange Framework that it does not delete the records that is already created in Sitecore upon Synchronization and run Sync again after deleting a record in CRM. Is ...
4
votes
1
answer
2k
views
Implementing redirect url feature in the ItemResolver pipeline
I'm working on a redirect url feature and have added a pipeline processor after the ItemResolver.
However the value of HttpContext.Current.Request.Url.LocalPath equals "/layouts/system/...
4
votes
1
answer
283
views
Why is SignInProcessor triggered twice?
I've created a custom pipeline to process the login to sent 2FA token. But somehow the pipeline is triggered twice. It doesn't happen with LoggingInProcessor (Used before Sitecore 9). Anyone know why?
...
4
votes
1
answer
103
views
Is there a way to differentiate when a custom processor is being executed out of Sitecore context instead of a package being installed?
I am implementing a custom processor for item:created and I'm wondering if there is any easy way to determine if the item being created is being processed through the context of a user using Sitecore ...
4
votes
2
answers
1k
views
Request processor executing multiple times per page load
I have written a custom processor in Sitecore to set the context language and country code. I am calling this processor on httpRequestBegin pipeline. The problem I am facing is that the processor is ...
4
votes
1
answer
773
views
AddFromTemplate Pipeline Processor Explanation
I am writing a processor for the <addFromTemplate> pipeline. I noticed the following code in a number of the examples
var item = args.FallbackProvider.AddFromTemplate(args.ItemName, args....
4
votes
2
answers
646
views
How to make a history record of the website in Sitecore?
I need to make a history of a Sitecore website. It should just be able to tell the editors when (from/to date) and what (content) have been on the website. I’m using Sitecore 8.2 update 2, and are ...
4
votes
1
answer
192
views
How to replace custom token that is in RichText field using Sitecore JSS?
I have a custom token %tokenname% in single line text and richtext fields. I would like to replace the token with some custom value in the Sitecore JSON rendering. Please see some example data below:
{...
4
votes
2
answers
562
views
How to catch field reset in item:saving event
I want to make a item:saving pipeline processor that will perform some operations when a item field is reset. I thought this would be simple, but it turned out to be trickier than I thought. Maybe I'm ...