Reputation: 599
Yesterday, the person in charge of adding content to our OrchardCMS website suddenly got this error when trying to access the Content section in the Dashboard and we can't add any new content any more.
I've imported a bacpac of the database in production and started locally debugging. When trying to access the Content an exception is thrown right here:
And, if we look in the database, the Orchard_Framework_ContentItemVersionRecord table contains a duplicated item with the same version Number, both are "latest version" and they both have the same ContentItemRecord_id.
My concern now is how should we fix this without causing any side effect somewhere else, since I don't fully understand how Orchard manages relations between items, parts, and versions.
Solution proposal:
It seems natural and obvious to manually update the "is latest version" of one of the items to false and increment the version number of the latest one.
Upvotes: 1
Views: 79
Reputation: 375
I remember that happened to me once before, it was ugly situation and a lot of debugging had to be done to find the cause. The only fix I could find back then was to alter/edit/fix the db data manually.
I must ask did that error happen once or does it happen all the time?
Upvotes: 1
Reputation: 473
Quick answer: it is probably due to double clicking the publish button... Small tip and hack: hide publish button on click...
Upvotes: 1