I have a piece of Event System code which used to work fine on 2013 SP1, but when upgraded to Web 8.5 throws the following error:
The item tcm:X-Y-16-v0 does not exist.
Event Viewer:
The original code was simply logging the subject and action (Component's ID, path, etc.), but here is a simplified version below which also results in a said error:
EventSystem.SubscribeAsync<Component, SaveEventArgs>(OnComponentSavePost, EventPhases.TransactionCommitted);
private void OnComponentSavePost(Component component, SaveEventArgs args, EventPhases phases)
{
Log(component.Path);
}
Looking at the documentation I can't find any reference as to why this would be happening, more specifically, about any underlying changes to the Event System / CM kernel. Any ideas?
Update
It's a fresh CM installation, there is no workflow and this is the only ES registered. I even stripped the code to the point that the only thing remaining in the configured dll is the code above. The error is thrown for both new and existing Components.
When remote debugging the code, only a couple of properties are available, the ID being a v0 (see below).
Update 2
I have tested with Subscribe()
(+ transaction committed) and the difference is that now I don't get an error
in EV, but instead a warning
, however the handler code fails nonetheless. The properties are still unavailable when remote debugging.