U4-5990 - Error when sorting List view by Last Edited

Created by Sunshine Lewis 10 Dec 2014, 18:12:32 Updated by Heather L Floyd 18 Apr 2018, 21:05:52

Relates to: U4-6003

Relates to: U4-10678

In Umbraco 7.2.0, convert the Media type "Folder" to List View. Then go to a Media folder and try to sort by the Last Edited column.

I get this error (from the console): ExceptionMessage: "Invalid column name 'updateDate'." ExceptionType: "System.Data.SqlClient.SqlException" Message: "An error has occurred." StackTrace: " at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) ↵ at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) ↵ at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) ↵ at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) ↵ at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() ↵ at System.Data.SqlClient.SqlDataReader.get_MetaData() ↵ at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) ↵ at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) ↵ at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) ↵ at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) ↵ at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) ↵ at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) ↵ at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) ↵ at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 235 ↵ at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() ↵ at Umbraco.Core.Persistence.Database.<Query>d__71.MoveNext() ↵ at System.Collections.Generic.List1..ctor(IEnumerable1 collection) ↵ at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) ↵ at Umbraco.Core.Persistence.Database.Fetch[T](String sql, Object[] args) ↵ at Umbraco.Core.Persistence.Database.Page[T](Int64 page, Int64 itemsPerPage, String sql, Object[] args) ↵ at Umbraco.Core.Persistence.Database.Page[T](Int64 page, Int64 itemsPerPage, Sql sql) ↵ at Umbraco.Core.Persistence.Repositories.VersionableRepositoryBase2.GetPagedResultsByQuery[TDto,TContentBase](IQuery1 query, Int32 pageIndex, Int32 pageSize, Int32& totalRecords, Tuple2 nodeIdSelect, Func2 processQuery, String orderBy, Direction orderDirection, Func1 defaultFilter) ↵ at Umbraco.Core.Persistence.Repositories.MediaRepository.GetPagedResultsByQuery(IQuery1 query, Int32 pageIndex, Int32 pageSize, Int32& totalRecords, String orderBy, Direction orderDirection, String filter) ↵ at Umbraco.Core.Services.MediaService.GetPagedChildren(Int32 id, Int32 pageIndex, Int32 pageSize, Int32& totalChildren, String orderBy, Direction orderDirection, String filter) ↵ at Umbraco.Web.Editors.MediaController.GetChildren(Int32 id, Int32 pageNumber, Int32 pageSize, String orderBy, Direction orderDirection, String filter) ↵ at lambda_method(Closure , Object , Object[] ) ↵ at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters) ↵ at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments) ↵ at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.<ExecuteAsync>b__4() ↵ at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func1 func, CancellationToken cancellationToken)"

I expect it to work the way it does when sorting Content by Last Edited or when sorting Media by Created. My installation is an upgrade from 7.1.4 to 7.2.0 in case that's relevant.

Comments

Andy Butland 20 Dec 2014, 21:07:43

This has been disabled (so can't sort still, but no error triggered) as part of this PR: https://github.com/umbraco/Umbraco-CMS/pull/591


Shannon Deminick 26 Jun 2017, 06:50:58

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.0

Due in version:

Sprint:

Story Points:

Cycle: