Open orchardbot opened 12 years ago
@sebastienros commented:
As you are writing http://.../RedBucket, I assumed the repro forgot to mention to add a Routable to Bucket.
Though I was not able to reproduce using the latest version of the source code.
\ Closed by sebastienros 01/13/2012 4:22PM
BitCrazed commented:
Sorry for the delay - been busy getting first public Orchard site launched!
Okay, so we're seeing this error reported when trying to access specific content items, but not other items of the same content type! The content type is defined as:
The site is built from a (current) enlistment from the Orchard tree. I have a project branch which I've regularly merged from Default branch and is up to date. The project has all the usual modules and I have added the latest versions of the following additional modules: Contrib.Cache Mello.ImageGallery
Content Type Id: ProductBreakdownCategory Fields: (None) Parts: Common Body Containable Container Custom Properties Identity Publish Later Route Tags Admin Menu
Site is running in Azure, configured to talk to SqlAzure DB, using .NET Framework Version 4.0.30319; ASP.NET Version 4.0.30319.272.
The exception details & stacktrace are as follows:
Exception Details: NHibernate.QueryException: could not resolve property: TitlePartRecord of: Orchard.ContentManagement.Records.ContentItemVersionRecord
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[QueryException: could not resolve property: TitlePartRecord of: Orchard.ContentManagement.Records.ContentItemVersionRecord]
NHibernate.Persister.Entity.AbstractPropertyMapping.ToType(String propertyName) +191
NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetPathInfo(String path) +292
NHibernate.Loader.Criteria.CriteriaQueryTranslator.CreateCriteriaEntityNameMap() +269
NHibernate.Loader.Criteria.CriteriaQueryTranslator..ctor(ISessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, String rootSQLAlias) +481
NHibernate.Loader.Criteria.CriteriaLoader..ctor(IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl rootCriteria, String rootEntityName, IDictionary2 enabledFilters) +162 NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results) +673 NHibernate.Impl.CriteriaImpl.List(IList results) +63 NHibernate.Impl.CriteriaImpl.UniqueResult() +65 Orchard.Core.Containers.Controllers.ItemController.Display(String path, PagerParameters pagerParameters) in c:\dev\Clients\MVP\Sites\mvp2\src\Orchard.Web\Core\Containers\Controllers\ItemController.cs:75 lambda_method(Closure , ControllerBase , Object[] ) +140 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters) +248
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 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, Func1 continuation) +640 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func
1 continuation) +640
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 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.<>cDisplayClassb.
BitCrazed commented:
Ah HAH! I think I've found the issue!
For some reason, the container that contains these content types allows the contained items to be sorted by Title ... even though the content item doesn't have a Title part!
Sorting by Routable Title (or any other field) prevents this error.
Why, then, is Title presented as a sortable property?
@bleroy commented:
Re-opening considering the new information.
@sebastienros commented:
Moving to later version as it is not critical. And it will be handled by Projector.
BitCrazed commented:
Erm ... excuse my ignorance here, but wouldn't an exception thrown by an aparrently valid end-user selected action be classed as a pretty substantial bug that should AT LEAST be fixed in the mainline branch?
It's not as if our users are doing anything cruel and unusual! ;)
@bleroy commented:
What do you mean? The bug is active.
BitCrazed commented:
I was replying to Sebastian's comment : "Moving to later version as it is not critical".
Does this mean you guys will be able to look into a fix for this in 1.3.x?
@bleroy commented:
Yes, we are less than two weeks away from shipping. The bar is extremely high. I'm afraid this doesn't meet it.
BitCrazed created: https://orchard.codeplex.com/workitem/18354
Repro steps: 1) Create new content type called "bucket". Make it a container 2) Create new content type called "fish". Make it containable 3) Create new "bucket" content item called "RedBucket". Configure it to contain "fish" and choose default sort order of "Title". 4) View http://.../RedBucket
Error reported: Could not resolve property: TitlePartRecord of: Orchard.ContentManagement.Records.ContentItemVersionRecord Exception Details: NHibernate.QueryException: could not resolve property: TitlePartRecord of: Orchard.ContentManagement.Records.ContentItemVersionRecord
See http://orchard.codeplex.com/discussions/285966 for exception dump.