Hello, I'm extending Random Pete's
Media Garden plugin by pulling in information from a feed and attaching it to his media content.
However, the program is throwing occasionally throwing an exception when creating tags. I can't reproduce the behavior reliably but it is when calling TagService.UpdateTagsForContentItem
That calls TagService.CreateTag(string tagName) (line 52 in TagService.cs) which then calls Repository.Create
Create throws the exception "could not insert: [Orchard.Core.Common.Models.CommonPartRecord#114][SQL: INSERT INTO Common_CommonPartRecord (OwnerId, CreatedUtc, PublishedUtc, ModifiedUtc, Container_id, Id) VALUES (?, ?, ?, ?, ?, ?)]"
"A duplicate value cannot be inserted into a unique index. [ Table name = Common_CommonPartRecord,Constraint name = PK__Common_CommonPartRecord__0000000000000105 ]"
I'm stumped why it throws errors consistently for some items but not others and since all the code is contained within the TagService I don't think his plugin is interfering in any way. Thoughts?