Upgrade to 1.7, OutputCache not working

Topics: Administration
Aug 21, 2013 at 9:08 AM
Maybe someone knows a solution. i've upgraded a 1.6 site to 1.7 through the in-place method.
I had previously installed Contrib.Cache and i wanted to enable Orchard.OutputCache as i understand it's the same module moved to the orchard default modules. After disabling Contrib.Cache and enabling Orchard.OutputCache it keeps telling me OuputCache should be upgraded. After the update is keeps telling it should be upgraded. Cache page in the admin interface gives an error:
Oops. Something went wrong ... sorry

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back
could not execute query [ select cacheparam0_.Id as Id694_, cacheparam0_.RouteKey as RouteKey694_, cacheparam0_.Duration as Duration694_, cacheparam0_.MaxAge as MaxAge694_ from Orchard_OutputCache_CacheParameterRecord cacheparam0_ where cacheparam0_.RouteKey=@p0 ] Name:p1 - Value:url=search;area=alion.search; [SQL: select cacheparam0_.Id as Id694_, cacheparam0_.RouteKey as RouteKey694_, cacheparam0_.Duration as Duration694_, cacheparam0_.MaxAge as MaxAge694_ from Orchard_OutputCache_CacheParameterRecord cacheparam0_ where cacheparam0_.RouteKey=@p0]
NHibernate.Exceptions.GenericADOException: could not execute query [ select cacheparam0_.Id as Id694_, cacheparam0_.RouteKey as RouteKey694_, cacheparam0_.Duration as Duration694_, cacheparam0_.MaxAge as MaxAge694_ from Orchard_OutputCache_CacheParameterRecord cacheparam0_ where cacheparam0_.RouteKey=@p0 ] Name:p1 - Value:url=search;area=alion.search; [SQL: select cacheparam0_.Id as Id694_, cacheparam0_.RouteKey as RouteKey694_, cacheparam0_.Duration as Duration694_, cacheparam0_.MaxAge as MaxAge694_ from Orchard_OutputCache_CacheParameterRecord cacheparam0_ where cacheparam0_.RouteKey=@p0] ---> System.Data.SqlClient.SqlException: Invalid object name 'Orchard_OutputCache_CacheParameterRecord'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() 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) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) 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.System.Data.IDbCommand.ExecuteReader() at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) --- End of inner exception stack trace --- at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Loader.Loader.ListUsingQueryCache(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet`1 querySpaces, IType[] resultTypes) at NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters) at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) at NHibernate.Impl.SessionImpl.List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results) at NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression, QueryParameters parameters) at NHibernate.Impl.ExpressionQueryImpl.List() at NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery) at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) at NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression) at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source) at Orchard.Data.Repository`1.Get(Expression`1 predicate) in c:\Orchard\src\Orchard\Data\Repository.cs:line 91 at Orchard.Data.Repository`1.Orchard.Data.IRepository<T>.Get(Expression`1 predicate) in c:\Orchard\src\Orchard\Data\Repository.cs:line 60 at Orchard.OutputCache.Services.CacheService.GetCacheParameterByKey(String key) at Orchard.OutputCache.Controllers.AdminController.Index() at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
Aug 21, 2013 at 9:09 AM
I guess i should file a bug?
Developer
Aug 21, 2013 at 9:43 AM
Is there an Orchard_OutputCache_CacheParameterRecord table in the DB? It seems there isn't. More interesting would be the exception that happens (because I guess there is one) when the update is being run.
Aug 21, 2013 at 9:56 AM
Hi thanks for the reply, i think i found the problem. My database user didn't have appropriate rights to change DB structure.
Aug 21, 2013 at 9:58 AM
The strange thing is that the update said it ran fine, but at the same time the update message was still shown. Maybe error handling during feature installation should be improved.