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
2 votes
2 answers
74 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'...
Marcel Gruber's user avatar
0 votes
3 answers
74 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: ...
Akshay D's user avatar
0 votes
1 answer
33 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)....
Harish's user avatar
  • 129
0 votes
0 answers
30 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 ...
Marcel Gruber's user avatar
2 votes
2 answers
122 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 ...
Kode's user avatar
  • 243
0 votes
1 answer
94 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 ...
sukesh's user avatar
  • 3,162
1 vote
1 answer
124 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;...
sukesh's user avatar
  • 3,162
1 vote
1 answer
87 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....
sukesh's user avatar
  • 3,162
1 vote
1 answer
35 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 ...
sukesh's user avatar
  • 3,162
0 votes
1 answer
65 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 ...
stelios kaltsounis's user avatar
1 vote
2 answers
256 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?
stelios kaltsounis's user avatar
1 vote
2 answers
128 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 ...
Erica Stockwell-Alpert's user avatar
1 vote
2 answers
419 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 ...
Ruchi Gupta's user avatar
0 votes
0 answers
128 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 ...
ajay shanbhag's user avatar
1 vote
3 answers
758 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:...
Rashmi Ranjan's user avatar
0 votes
2 answers
425 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....
Reddy's user avatar
  • 125
1 vote
0 answers
197 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 ...
Matthew Dresser's user avatar
1 vote
1 answer
409 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:...
Imad's user avatar
  • 235
2 votes
1 answer
674 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 ...
Gowthamaraja Eswaramoorthy's user avatar
0 votes
0 answers
73 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 ...
Ashish's user avatar
  • 912
0 votes
1 answer
109 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()) { --...
Ashish's user avatar
  • 912
3 votes
0 answers
219 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 ...
theyetiman's user avatar
1 vote
1 answer
418 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). ...
Ken McAndrew's user avatar
  • 5,112
2 votes
2 answers
429 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?
Ken Gray's user avatar
  • 103
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 ...
Matthew Dresser's user avatar
2 votes
1 answer
809 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 ...
Matthew Dresser's user avatar
3 votes
1 answer
620 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-...
Ken McAndrew's user avatar
  • 5,112
2 votes
1 answer
216 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 ...
D J's user avatar
  • 385
1 vote
0 answers
326 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 ...
Arun Kumar's user avatar
4 votes
2 answers
568 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 ...
mikaelnet's user avatar
  • 809
1 vote
1 answer
94 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 ...
Mie ElMansy's user avatar
1 vote
0 answers
198 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 ...
Emanuele Ciriachi's user avatar
1 vote
1 answer
238 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 ...
user3213640's user avatar
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 ...
PSS's user avatar
  • 607
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, ...
Thenmozhi Subramaniam's user avatar
1 vote
1 answer
179 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 ...
Abhi's user avatar
  • 311
5 votes
1 answer
640 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 ...
theyetiman's user avatar
1 vote
0 answers
310 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 ...
Ken McAndrew's user avatar
  • 5,112
0 votes
1 answer
856 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 ...
Gowthamaraja Eswaramoorthy's user avatar
1 vote
1 answer
661 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 ...
mitesh patel's user avatar
0 votes
0 answers
296 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 ...
Emanuele Ciriachi's user avatar
1 vote
1 answer
613 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 ...
user avatar
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?
Shubham Bassi's user avatar
2 votes
2 answers
725 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 ...
Harsh Baid's user avatar
  • 1,994
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?
Durga Bose's user avatar
2 votes
1 answer
600 views

Updating Media Item Stream on Item:Saved Event

I had implemented a item:saved event handler that updates the MediaStream of a MediaItem. The code is roughly like this: public void OnItemSaved(object sender, EventArgs args) { ...
Bagus Tesa's user avatar
4 votes
1 answer
726 views

How to get PageViewEvents from Interaction

I am getting a little bit confused getting events from facets in sitecore 9.0.1. As I understand there are two different Facet and Event class definitions. The Sitecore.XConnect version and the ...
Wilko van der Veen's user avatar
3 votes
1 answer
689 views

Publish:complete not fired when publishing through code

We have added an event to publish:complete and it is working fine when we publish in Sitecore (manually). However, when we do the exact same publish in code the event is not fired. The code: var ...
Gatogordo's user avatar
  • 20.1k
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, ...
Bagus Tesa's user avatar
0 votes
1 answer
517 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 ...
Teeknow's user avatar
  • 2,477