Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I tried to hook up on ContentService.Created event and I'm trying to access the Id of the created content
I can access the Id on Saved events though.
Is this by design? I just thought that it is already "created" that's why it I thought it should have an Id already
There was / is a bug concerning the content ID in the created event. Which version of umbraco do you use?
I hope it is a bug that can be easily fixed. It's 6.1.1 from nuget.
Also, I noticed that e.Parent is sometimes null but e.ParentId is not for Creating event. Sometimes, e.ParentId is 0 and e.Parent.Id has value
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Content Id of the created item not available in ContentService.Created event
I tried to hook up on ContentService.Created event and I'm trying to access the Id of the created content
I can access the Id on Saved events though.
Is this by design? I just thought that it is already "created" that's why it I thought it should have an Id already
There was / is a bug concerning the content ID in the created event. Which version of umbraco do you use?
I hope it is a bug that can be easily fixed. It's 6.1.1 from nuget.
Also, I noticed that e.Parent is sometimes null but e.ParentId is not for Creating event. Sometimes, e.ParentId is 0 and e.Parent.Id has value
is working on a reply...