Skip to main content

Questions tagged [events]

For questions related to the Sitecore Event system. This includes the Event Queue, event handling, custom events.

Filter by
Sorted by
Tagged with
1 vote
2 answers
578 views

Things I should keep in mind before performing any bulk update in Sitecore items programmatically to avoid any SQL deadlock

I am using Sitecore 9.1 and I need to know what things I should keep in mind before performing bulk operation programmatically on Sitecore Items for multiple languages in parallel to avoid the SQL ...
1 vote
2 answers
483 views

What is best way to generate Sitemap.xml in Content delivery server(NON SXA)

Currently, we are generating Sitemap.xml on the Publishing end event (publish:end:remote), this event takes some time to complete Publishing and this is causing the slowness. We using the Sitecore 9.0....
1 vote
1 answer
190 views

item:saving event has both new and old field values

I have followed this example and here is my custom event handler for item:saving. protected void OnItemSaving(object sender, EventArgs args) { Item newItem = Event.ExtractParameter(args, 0) as Item;...
2 votes
2 answers
184 views

One or more exceptions occurred while processing the subscribers to the 'publish:end:remote' event

I recently started seeing errors on my headless SXA CM instance every time a publish operation is performed: One or more exceptions occurred while processing the subscribers to the 'publish:end:remote'...
0 votes
3 answers
79 views

How to update a link field when a drop list item is selected?

Is there a way to dynamically change the value of a Template field in Sitecore based on other template field selected value. For example, let's say we have a template that has the following fields: ...
0 votes
1 answer
37 views

Index rebuild on CM server only updates some CD servers in Sitecore

I have a Sitecore architecture with 1 CM server and 4 CD servers split into an A and B environment (2 servers each). The A and B environments each have their own separate databases (uatadb and uatbdb)....
0 votes
0 answers
43 views

NullReferenceException on Sitecore.Data.Eventing.Remote.MovedItemRemoteEvent

On my 9.0.2 Sitecore Reporting site, I saw this error in the logs: ERROR Exception while handling event Sitecore.Data.Eventing.Remote.MovedItemRemoteEvent Exception: System.NullReferenceException ...
2 votes
2 answers
138 views

CD Tied to Publishing Target Not Updating

I am using the Publishing Service in a Sitecore 10.2 Production environment. We use deployment slots in Azure App Services. Each deployment slot has a dedicated Web database, Slot 1 has Web and Slot 2 ...
0 votes
1 answer
135 views

How to pass custom data between Sitecore events

I would like to pass an object from the item:created event to the item:saving event, but unable to do so. This is to add custom logs for certain events. When an item is created, I will be logging the ...
1 vote
1 answer
44 views

item:saving event is triggered for Schedule Task items on CMS refresh

I'm working on logging item events using custom handlers. I observe that whenever the CMS page is refreshed or an item is created, the item:saving and item:saved events are being triggered and those ...
1 vote
1 answer
104 views

item:save events are triggered twice when an item is created

I'm trying to log item events like - on item created, on item saved etc. patch.config: <events> <event name="item:created"> <handler type="Basiscore.CmsAudit....
0 votes
1 answer
70 views

Indexes on content delivery servers stopped updating on publish end

Some day both indexes on content delivery servers stopped updating (on publish end). I have searched the internet, "failed requests tracing" is not enabled, the default\anonymous user has ...
1 vote
2 answers
176 views

Custom item:saving breaking Final renderings Sitecore 10.2

Working in Sitecore 10.2, we have a new site that we've added custom processors to to update fields on item:save that need to be automatically generated. We have a very simple processor that sets a ...
1 vote
2 answers
331 views

how can I run code on Sitecore on an event under a specific security account?

The events handlers in Sitecore run under default\anonymous (i.e. onpublish:end:remote). Can I run the code under Extranet\anonymous account?
0 votes
0 answers
154 views

does publish-item powershell command fire publish end event and can we get property like rootItem

$singleitem=get-childItem -path $RootItemPath -Language "en" -Recurse | Where {$_.TemplateName -eq "TEST"} | Select-Object -first 1 publish-item -Item $singleitem -publishmode ...
1 vote
3 answers
981 views

Remote Event in Sitecore

what is the difference between normal event and remote events ? And when to customize the remote one ? Can someone please help me understand this with a practical scenario ? for e.g. name="item:...
1 vote
0 answers
234 views

Does Sitecore.Jobs.JobManager persist job data to the Tasks or EventQueue table within the Core DB?

For Sitecore 9.2 are Jobs persisted within the Core DB or are they simply stored in memory? I have an event handler that executes on publish:end and publish:end:remote to start the Job, but it always ...
1 vote
1 answer
530 views

Clearing Sitecore cache on publish for specific items

I want to clear custom cache when items at specific path are published. Here is what I tried so far. Solution 1: I created a custom event handler for publish:itemProcessed and publish:itemProcessed:...
0 votes
1 answer
113 views

How to enable Synchronizing the Index in if(EventDisabler())?

I am adding data in event item:versionAdded and when adding new version then it is calling item:versionAdded event again. For solving this issue I am adding data under: using (new EventDisabler()) { --...
2 votes
1 answer
814 views

Run Powershell script when an Item is being published

I'm trying to do implement some logic while a particular template item is getting published. To implement this logic I started exploring the Sitecore Powershell's Event Handlers. For the events like ...
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?
11 votes
5 answers
2k views

Is it possible to associate goal triggering on button click without code?

In sitecore DMS is there any way to associate goal triggering on button click without code , i read some blogs which are giving info regarding how to associate item or pdf to trigger goal . So is it ...
0 votes
0 answers
78 views

How to fetch selected version value in programming in Sitecore 9.1.1?

When I will click in the Sitecore client to change versions, I would like to be able to run some code. So, Is there any event when I will select any version number in the Sitecore client? I am sharing ...
3 votes
0 answers
226 views

How does Sitecore determine which EventQueue database to use for a given event and how to change it

Sitecore 8.2 I have a CM and 2 CDs like so: ___ CD1 (web1, core) CM (master, core, web1, web2) ____/ \___ CD2 (web2, core2) Note ...
1 vote
1 answer
453 views

Making use of the "user" events

I'm using Sitecore 9.1.1, and in the sitecore.config there are a series of user events (user:created, user:created:remote, user:deleted, user:deleted:remote, user:updated, user:updated:remote, etc). ...
2 votes
2 answers
476 views

Can someone explain more about Events in Sitecore?

When would I use or create events under the marketing control panel? Also, what is the difference in the marketing control panel events and the ones found under Analyze > Attributes > Events?
10 votes
2 answers
2k views

How to raise an event in Sitecore 9+

In Sitecore 9 the event model has changed somewhat and events are now queued within each DB (master, core, web etc). Edit: turns out I was a bit wrong here. Sitecore has for some time had the ability ...
2 votes
1 answer
893 views

How to clear HtmlCache on a CD server from an admin page

How would I go about creating an admin page to clear the cache on a CD server? Looking at this question/answer I would assume the following: Define a new cache:clear custom event in a new config ...
1 vote
0 answers
329 views

$name token not replaced when creating from branch template

Sitecore 9.02 - I have a branch template I've made to create a new page. The template it's based on has a Title field with a standard value set to $name to do the replacement. However, when I create ...
3 votes
1 answer
636 views

Sync a single bucketed item to change its path

I've written a custom bucket action to set the path based on a template date field, rather than the created date. I based this information off this blog: http://techitpro.com/uncategorized/sitecore-...
2 votes
2 answers
3k views

What is the event called when application starts?

I am trying to attach a handler/code when the Sitecore web application instance is starting up. What event is triggered when the application instance starts?
4 votes
2 answers
2k views

Couldn't trigger custom event handler or Processor in Sitecore Publishing Service? [closed]

I have a requirement to invalidate the file in cdn cache on completion of sitecore item publishing. To achieve this I have created custom processor and patched into "publishEndResultBatch" pipeline, ...
0 votes
1 answer
121 views

SiteDefinition Config Events - Site Changed to MyCompanyName

I noticed a strange difference between our Production and QA Sitecore websites that was deliberately done by our Sitecore vendor. In the SiteDefinition.config file, the site block is changed to ...
2 votes
1 answer
230 views

In which project should we override item:publish event

I am very new to helix principles. I have created the project structure following sample habitat project. My requirement is to call an external api when any item ( of a specific template) is ...
4 votes
2 answers
590 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 ...
1 vote
0 answers
341 views

Sitecore 9.1.1 remote events not executing on CM server

I am trying to get a remote event fired from CD server to CM server and then CM server to create the item required in Sitecore 9.1.1. I can see the event gets added to the database but it never gets ...
1 vote
1 answer
105 views

Catching the name of an event that triggered another event

I am using Sitecore 9.1.1 The issue is, I have a custom eventhandler for onPublishEnd where I set the value of a certain field (Ex: Field A) by using BeginEdit() and EndEdit(), which in turn ...
1 vote
0 answers
206 views

How to programmatically refresh a Sitecore screen?

I have an Event firing on item:saved, that ends up modifying some fields on the same item being saved. This of course is not immediately reflected on the Sitecore interface, causing a misleading ...
1 vote
1 answer
249 views

Item Created Event for Web database and send email

I have a requirement to send a email to subscribers once a blog will be available publicly. Requirement is very specific that email will be send only one time when item is created, not on update or ...
0 votes
1 answer
2k views

Write a file with item field data when item is saved

I want to access all the data of an item when I click Save button in Sitecore. Suppose I have an ITEM A. If I click Save button in Sitecore, I would like to store all the data in the fields to a ...
1 vote
1 answer
181 views

How to preserve the workflow state on closing a custom modal in Sitecore 8.1

My Customer has a regulatory compliance requirement to add secondary authentication prior to any workflow approval, so the approach that I have taken is by defining a custom Action which opens a ...
4 votes
1 answer
2k views

Prevent Item Duplication in Sitecore

I want to prevent user from creating item with duplicate name. I've referenced Sitecore Climber's Prevent Duplicates approach with slight modification to prevent item duplication due to rename, copy, ...
1 vote
1 answer
686 views

Multiple time custom item:saved event call

I added new patch for item:saved event for media add, edit, update and rename in CDN server. When i am adding new item in media library at that time my custom method OnItemSaved called multiple times ...
5 votes
1 answer
666 views

Sitecore multiple CD web databases publishing/indexing EventQueue database name

Say I have a single CM with 1x master db, 1x core db and 2x web dbs (2x publishing targets) for 2x CD servers in different regions. I can't call both web dbs "web" - one must be something ...
0 votes
1 answer
898 views

Avoid publishing queues / allow concurrent users to publish on Sitecore 8.1

Recently I came across a request from my client that they often get publishing queued. When we are in initial stage we only have few sites any very minimal users who is working on our CM. But ...
0 votes
0 answers
321 views

What are ALL the Events triggered when an item is edited?

I have the following code: using (new SecurityDisabler()) { using (new EditContext(itemToChange, false, false)) { itemToChange[field] = theValue; } } the third parameter of ...
1 vote
1 answer
637 views

How to add renderings programmatically when another rendering is added

Which pipeline should I use when a new rendering is added in the presentation? I have a scenario to add renderings programmatically if a particular rendering is added in the item. I will write a ...
2 votes
2 answers
757 views

Error while publishing when items are moved in SXA based website

SXA v1.7.1 with Sitecore v9.0.2 I'm regularly getting this error in Sitecore when trying to publish after I have restructured some items in master database. If I delete the modified sub-tree from web ...
0 votes
1 answer
568 views

Using End Edit Silent and Showing Updated Field Values

I have an event processor similar to this. I was originally passing in true for the parameter silent to Item.Editing.EndEdit(bool silent). I figured that this programmatic change wouldn't need to ...
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?