Closed rjpowers10 closed 5 months ago
Are you doing any update on the data in a ContentHandler that could make this happen? Basically, it says that the record you are asking for has previously changed in the same session you are using. You then need to use a different scoped session to retrieve this record knowing that it will retrieve the current record stored in the database and not necessarily the one that you just updated. Else, you need to find a way to pass the updated data to your method if that's what you want to use/display.
Are you doing any update on the data in a ContentHandler that could make this happen?
Hmm, no, I don't think any updates should be happening here. We do have a few content handlers but in this context we should only be displaying the content items.
I know this isn't a lot of information to go on so I'll try digging into it a little more.
Usually it means some code forgot the await
keyword. Can you check all the ways you are using a session and if you might have this issue?
Getting the same exception when using a service from another tenant's scope:
_shellHost.GetScopeAsync(tenant)
Can someone share a repro?
Can someone share a repro?
It happened again but I'm still not sure why. I'll try to come up with a minimal repro.
happens to me on the test running on Azure devops, Funny is test are running perfectly on the dev pc. I am using Sqlite inmemory for tests.
i have the same error the only thing i did, has been publied my project in the server iis to production and in the log show me that Category: OrchardCore.ContentManagement.Display.ContentItemDisplayCoordinator
TermPartContentDriver thrown from BuildDisplayAsync by InvalidOperationException
Exception:
System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at OrchardCore.ContentManagement.ContentExtensions.Get(ContentElement contentElement, Type contentElementType, String name)
at OrchardCore.ContentManagement.ContentExtensions.Get[TElement](ContentElement contentElement, String name)
at OrchardCore.Taxonomies.Drivers.TermPartContentDriver.DisplayAsync(ContentItem model, BuildDisplayContext context)
at OrchardCore.ContentManagement.Display.ContentItemDisplayCoordinator.BuildDisplayAsync(ContentItem contentItem, BuildDisplayContext context)
Initial issue was about OrchardCore.ContentManagement.DefaultContentManagerSession.Store(ContentItem item)
. Latest comment is about OrchardCore.ContentManagement.ContentExtensions.Get(ContentElement contentElement, Type contentElementType, String name) -> TryGetValue
which are two different cases.
``hi how i can fix this probleme OrchardCore.ContentManagement.ContentExtensions.Get(ContentElement contentElement, Type contentElementType, String name) mi site works fine but in server show mer this error
OrchardCore.ContentManagement.DefaultContentManagerSession.Store(ContentItem item)
. Latest comment is about OrchardCore.ContentManagement.ContentExtensions.Get(ContentElement contentElement, Type contentElementType, String name) -> TryGetValue
which are two different cases.
We need a specific repro for this to be able to investigate.
@Piedone I haven't encountered this issue for some time. In fact I had completely forgotten about it. I'm fine with closing it out. If I do see it again I'll try to get repro steps.
OK, thank you!
Sub-1000, yiss!
Describe the bug
I'm using ISession.Query to query for a content item. I'm also calling the extension method FirstOrDefaultAsync that takes an IContentManager to ensure that the IContentManager.LoadAsync method is called.
https://github.com/OrchardCMS/OrchardCore/blob/5da5858fe04ac864430fddfdc91fa9c4806a51cc/src/OrchardCore/OrchardCore.ContentManagement.Abstractions/ContentQueryOfTIndexExtensions.cs#L18
I encountered this error and was wondering if someone on the OC team might be able to make sense of it. It's not consistently repeatable for me; in fact it's only happened one time. Sorry I don't have anything more specific to say. Is there anything else I can provide to help?
My calling code basically looks like this.