Culture "Pick" Error

Topics: Troubleshooting
Aug 29, 2011 at 9:31 AM
Edited Aug 29, 2011 at 9:31 AM

I guess this error is caused, because there is no table called Orchard.ContentManagement.Records.ContenItemRecord.

The closest one i could find is Orchard.Framework.ContentItemRecord

I've reinstalled Localization, CulturePickerModule and both my Cultures twice already, still the error stays. It used to work at some point, but the only thing i changed was the view. But even with the original view, this error comes up. Any ideas ?

 

 

Server Error in '/orchard' Application.  


No row with the given identifier exists[Orchard.ContentManagement.Records.ContentItemRecord#517]

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: NHibernate.ObjectNotFoundException: No row with the given identifier exists[Orchard.ContentManagement.Records.ContentItemRecord#517]

Source Error:

 

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:

[ObjectNotFoundException: No row with the given identifier exists[Orchard.ContentManagement.Records.ContentItemRecord#517]]
   NHibernate.Impl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) +50
   NHibernate.ByteCode.Castle.LazyInitializer.Intercept(IInvocation invocation) +210
   ContentItemRecordProxy572bd473e40d429e957825dba6b8f721.get_ContentType() +185
   Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\ContentManagement\DefaultContentManager.cs:139
   System.Linq.WhereSelectListIterator`2.MoveNext() +232
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +472
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   Orchard.ContentManagement.ContentQuery`1.Orchard.ContentManagement.IContentQuery<T>.List() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\ContentManagement\DefaultContentQuery.cs:184
   Orchard.CulturePicker.Services.LocalizableContentService.TryGetRouteForUrl(String url, RoutePart& route) +143
   Orchard.CulturePicker.Controllers.UserCultureController.ChangeCulture(String cultureName) +131
   lambda_method(Closure , ControllerBase , Object[] ) +127
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +248
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +125
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +312
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691
   System.Web.Mvc.Controller.ExecuteCore() +162
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Mvc\Routes\ShellRoute.cs:148
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

Coordinator
Aug 29, 2011 at 9:43 AM
Orchard.ContentManagement.Records.ContentItemRecord is not a table name, it's an entity name in the NHibernate mapping. I would suggest you to check content item record with id# 517. Maybe it's some garbage in your database. CulturePicker is able to find it, but Orchard engine does not allow to display this item. If this item is crap - try to delete it, maybe it will help. Please, also submit this issue to the issue tracker, I will try to handle this problem if time will allow.

On Mon, Aug 29, 2011 at 11:31 AM, coretex <notifications@codeplex.com> wrote:

From: coretex

I guess this error is causes, because there is no table called Orchard.ContentManagement.Records.ContenItemRecord.

The closes one i could find is Orchard.Framework.ContentItemRecord

I've reinstalled Localization, CulturePickerModule and both my Cultures twice already, still the error stays. It used to work at some point, but the only thing i changed was the view. But even with the original view, this error comes up. Any ideas ?

Server Error in '/orchard' Application.


No row with the given identifier exists[Orchard.ContentManagement.Records.ContentItemRecord#517]

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: NHibernate.ObjectNotFoundException: No row with the given identifier exists[Orchard.ContentManagement.Records.ContentItemRecord#517]

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:

[ObjectNotFoundException: No row with the given identifier exists[Orchard.ContentManagement.Records.ContentItemRecord#517]]
   NHibernate.Impl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) +50
   NHibernate.ByteCode.Castle.LazyInitializer.Intercept(IInvocation invocation) +210
   ContentItemRecordProxy572bd473e40d429e957825dba6b8f721.get_ContentType() +185
   Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\ContentManagement\DefaultContentManager.cs:139
   System.Linq.WhereSelectListIterator`2.MoveNext() +232
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +472
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   Orchard.ContentManagement.ContentQuery`1.Orchard.ContentManagement.IContentQuery<T>.List() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\ContentManagement\DefaultContentQuery.cs:184
   Orchard.CulturePicker.Services.LocalizableContentService.TryGetRouteForUrl(String url, RoutePart& route) +143
   Orchard.CulturePicker.Controllers.UserCultureController.ChangeCulture(String cultureName) +131
   lambda_method(Closure , ControllerBase , Object[] ) +127
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +248
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +125
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +312
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691
   System.Web.Mvc.Controller.ExecuteCore() +162
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Mvc\Routes\ShellRoute.cs:148
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

Read the full discussion online.

To add a post to this discussion, reply to this email (orchardculturepicker@discussions.codeplex.com)

To start a new discussion for this project, email orchardculturepicker@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Aug 29, 2011 at 9:55 AM

well i found a few and deleted them. However it still tries to access it.

I don't really see a reason why, since my Culteres have IDs 2 and 4. What exactly is it looking for ?

Aug 29, 2011 at 10:23 AM

alright, i found a few more that were linked to 517 , deleted them and now it works again.

Coordinator
Aug 29, 2011 at 11:27 AM
I guess it happens, because Orchard keeps deleted items in the database. Culture Picker should ignore these items when it searches localized content. I will try to fix it.

On Mon, Aug 29, 2011 at 12:23 PM, coretex <notifications@codeplex.com> wrote:

From: coretex

alright, i found a few more that were linked to 517 , deleted them and now it works again.

Read the full discussion online.

To add a post to this discussion, reply to this email (orchardculturepicker@discussions.codeplex.com)

To start a new discussion for this project, email orchardculturepicker@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com