Check out how IBM created the “Virtual Forbidden City” and gain some knowledge on SOA.
Virtual Event on the 28th or 29th April.
Jerry's Impressions, fresh from his brain.
Check out how IBM created the “Virtual Forbidden City” and gain some knowledge on SOA.
Virtual Event on the 28th or 29th April.
Sitecore has a wonderful system to add your code to specific events. I have used Item:Saving to summarize some content fields into one specific field which we used for indexing. That worked great.
Recently I received a request to do some more sophisticated checks on some fields and deny saving when something does not fit.
I remembered my OnItemSaving method and added some code to it, but when something went wrong, the message box telling the error came twice.
After some debugging I found that the code really gets called twice. But why?
Try yourself – check your web.config and set <events timingLevel="custom"> to <events timingLevel="high">. Modify an item, save it and check your log file:
Event started: item:creating
Event ended: item:creating. Elapsed: 0.00838095344520044
Event started: item:created
Event ended: item:created. Elapsed: 0.00502857206712026
Event started: item:versionAdding
Event ended: item:versionAdding. Elapsed: 0.00474920695228025
Event started: item:saving
Event ended: item:saving. Elapsed: 0.00586666741164031
Event started: item:saved
Event ended: item:saved. Elapsed: 419.566732643395
Event started: item:versionAdded
Event ended: item:versionAdded. Elapsed: 0.00474920695228025
Event started: item:added
Event ended: item:added. Elapsed: 0.00502857206712026
Event started: item:saving
Event ended: item:saving. Elapsed: 0.00419047672260022
Event started: item:saved
Event ended: item:saved. Elapsed: 98.5195045739054
Any Idea? :-)