This project is read-only.
1
Vote

Bug in taxonomies TermWidgetPartDriver

description

This occurs after adding a Taxonomy field to productPart (from Nwazet.Commerce), defining several terms, some of them being headers they can't be selected, several term being selectable for each product.

Categories
->Technical (not selectable)
   ->-> Server
   ->->DB
->Business (not selectable)
->->CRM
->->Office

Then create a Term widget based on Categories, using the Technical non selectable term, looking for products.

In the display method, an exception is triggered when on
                    list.AddRange(
                        results
                            .Slice(0, part.Count)
                            .ToList()
                            .Select( tp => _contentManager.BuildDisplay(tp.ContentItem, "Summary"))
                    );
results contains 15 elements
Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator - QueryException thrown from IContentPartDriver by Orchard.Taxonomies.Drivers.TermWidgetPartDriver
NHibernate.QueryException: could not resolve property: ContentType of: Orchard.Core.Common.Models.CommonPartRecord
   à NHibernate.Persister.Entity.AbstractPropertyMapping.ToType(String propertyName)
   à NHibernate.Persister.Entity.AbstractEntityPersister.GetSubclassPropertyTableNumber(String propertyPath)
   à NHibernate.Persister.Entity.BasicEntityPropertyMapping.ToColumns(String alias, String propertyName)
   à NHibernate.Persister.Entity.AbstractEntityPersister.ToColumns(String alias, String propertyName)
   à NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetColumns(ICriteria subcriteria, String propertyName)
   à NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetColumnsUsingProjection(ICriteria subcriteria, String propertyName)
   à NHibernate.Criterion.CriterionUtil.GetColumnNamesUsingPropertyName(ICriteriaQuery criteriaQuery, ICriteria criteria, String propertyName, Object value, ICriterion critertion)
   à NHibernate.Criterion.CriterionUtil.GetColumnNamesForSimpleExpression(String propertyName, IProjection projection, ICriteriaQuery criteriaQuery, ICriteria criteria, IDictionary`2 enabledFilters, ICriterion criterion, Object value)
   à NHibernate.Criterion.SimpleExpression.ToSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery, IDictionary`2 enabledFilters)
   à NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetWhereCondition(IDictionary`2 enabledFilters)
   à NHibernate.Loader.Criteria.CriteriaJoinWalker..ctor(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, ICriteria criteria, String rootEntityName, IDictionary`2 enabledFilters)
   à NHibernate.Loader.Criteria.CriteriaLoader..ctor(IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl rootCriteria, String rootEntityName, IDictionary`2 enabledFilters)
   à NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results)
   à NHibernate.Impl.CriteriaImpl.List(IList results)
   à NHibernate.Impl.CriteriaImpl.List[T]()
   à Orchard.ContentManagement.DefaultContentQuery.Slice(Int32 skip, Int32 count) dans e:\Datwendo\Cloudissime\src\Orchard\ContentManagement\DefaultContentQuery.cs:ligne 156
   à Orchard.ContentManagement.DefaultContentQuery.ContentQuery`1.Orchard.ContentManagement.IContentQuery<T>.Slice(Int32 skip, Int32 count) dans e:\Datwendo\Cloudissime\src\Orchard\ContentManagement\DefaultContentQuery.cs:ligne 210
   à Orchard.Taxonomies.Drivers.TermWidgetPartDriver.<>c__DisplayClass6.<Display>b__4()
   à Orchard.ContentManagement.Drivers.ContentPartDriver`1.<>c__DisplayClassf.<ContentShape>b__e(BuildShapeContext ctx) dans e:\Datwendo\Cloudissime\src\Orchard\ContentManagement\Drivers\ContentPartDriver.cs:ligne 130
   à Orchard.ContentManagement.Drivers.ContentPartDriver`1.<>c__DisplayClass15.<ContentShapeImplementation>b__14(BuildShapeContext ctx) dans e:\Datwendo\Cloudissime\src\Orchard\ContentManagement\Drivers\ContentPartDriver.cs:ligne 139
   à Orchard.ContentManagement.Drivers.ContentShapeResult.ApplyImplementation(BuildShapeContext context, String displayType) dans e:\Datwendo\Cloudissime\src\Orchard\ContentManagement\Drivers\ContentShapeResult.cs:ligne 39
   à Orchard.ContentManagement.Drivers.ContentShapeResult.Apply(BuildDisplayContext context) dans e:\Datwendo\Cloudissime\src\Orchard\ContentManagement\Drivers\ContentShapeResult.cs:ligne 21
   à Orchard.ContentManagement.Drivers.Coordinators.ContentPartDriverCoordinator.<>c__DisplayClassa.<BuildDisplay>b__9(IContentPartDriver driver) dans e:\Datwendo\Cloudissime\src\Orchard\ContentManagement\Drivers\Coordinators\ContentPartDriverCoordinator.cs:ligne 49
   à Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) dans e:\Datwendo\Cloudissime\src\Orchard\InvokeExtensions.cs:ligne 17

comments

CSADNT wrote Apr 29, 2013 at 3:01 PM

Reported this on Orchard... I have not realized I was in Taxonomies