You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My template with an @this.WorkContext.CurrentUser.UserName in it was throwing an object reference error when I signed-out of a page.
When I realized it was the template + sign out combination that was throwing the error I went and clicked "clone" on the template, which created a duplicate. I then went in and changed the name of the template and clicked save. That throws the following error:
Server Error in '/OrchardLocal' Application.
An item with the same key has already been added.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: An item with the same key has already been added.
Source Error:
Line 55: _cacheContextAccessor.Current = context;
Line 56:
Line 57: entry.Result = acquire(context);
Line 58: }
Line 59: finally {
I dug into the DB. Under Orchard_Framework_ContentItemRecord I found the two templates. However, they BOTH had the same identical , where "#" was a long alpha numeric key. Deleting the DB entry for the one I "Cloned" fixed my problem.
So it appears that cloning should be disabled in the Admin > Template screen, or some other work around.
I imagine any content items that can be cloned may run into this same problem IF an Identity Part is attached AND the user clicks "Clone"?
The text was updated successfully, but these errors were encountered:
remesq created:
https://orchard.codeplex.com/workitem/21263
My template with an @this.WorkContext.CurrentUser.UserName in it was throwing an object reference error when I signed-out of a page.
When I realized it was the template + sign out combination that was throwing the error I went and clicked "clone" on the template, which created a duplicate. I then went in and changed the name of the template and clicked save. That throws the following error:
Server Error in '/OrchardLocal' Application.
An item with the same key has already been added.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: An item with the same key has already been added.
Source Error:
Line 55: _cacheContextAccessor.Current = context;
Line 56:
Line 57: entry.Result = acquire(context);
Line 58: }
Line 59: finally {
Source File: e:\DEVELOPMENT\Orchard 1.9-int\src\Orchard\Caching\Cache.cs Line: 57
The entire site became unavailable.
I dug into the DB. Under Orchard_Framework_ContentItemRecord I found the two templates. However, they BOTH had the same identical , where "#" was a long alpha numeric key. Deleting the DB entry for the one I "Cloned" fixed my problem.
So it appears that cloning should be disabled in the Admin > Template screen, or some other work around.
I imagine any content items that can be cloned may run into this same problem IF an Identity Part is attached AND the user clicks "Clone"?
The text was updated successfully, but these errors were encountered: