First I had no search results for pages, even though they were in the index. I have deleted the index, created new one, and wanted to add Page Content Type to it, but now when I save I get following error:
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 indexingta0_.Id as Id154_, indexingta0_.Action as Action154_, indexingta0_.CreatedUtc as CreatedUtc154_, indexingta0_.ContentItemRecord_id as ContentI4_154_ from Orchard_Indexing_IndexingTaskRecord indexingta0_ where indexingta0_.ContentItemRecord_id=@p0 ] Name:p1 - Value:Orchard.ContentManagement.Records.ContentItemRecord [SQL: select indexingta0_.Id as Id154_, indexingta0_.Action as Action154_, indexingta0_.CreatedUtc as CreatedUtc154_, indexingta0_.ContentItemRecord_id as ContentI4_154_ from Orchard_Indexing_IndexingTaskRecord indexingta0_ where indexingta0_.ContentItemRecord_id=@p0]
NHibernate.Exceptions.GenericADOException: could not execute query [ select indexingta0_.Id as Id154_, indexingta0_.Action as Action154_, indexingta0_.CreatedUtc as CreatedUtc154_, indexingta0_.ContentItemRecord_id as ContentI4_154_ from Orchard_Indexing_IndexingTaskRecord indexingta0_ where indexingta0_.ContentItemRecord_id=@p0 ] Name:p1 - Value:Orchard.ContentManagement.Records.ContentItemRecord [SQL: select indexingta0_.Id as Id154_, indexingta0_.Action as Action154_, indexingta0_.CreatedUtc as CreatedUtc154_, indexingta0_.ContentItemRecord_id as ContentI4_154_ from Orchard_Indexing_IndexingTaskRecord indexingta0_ where indexingta0_.ContentItemRecord_id=@p0] ---> System.Data.SqlClient.SqlException: Invalid object name 'Orchard_Indexing_IndexingTaskRecord'. Statement(s) could not be prepared. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 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.System.Data.IDbCommand.ExecuteReader() at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\AdoNet\AbstractBatcher.cs:line 229 at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1224 at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 419 at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 251 at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1564 --- End of inner exception stack trace --- at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1571 at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1472 at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet
1 querySpaces, IType[] resultTypes) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Loader\Loader.cs:line 1465 at NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Hql\Ast\ANTLR\Loader\QueryLoader.cs:line 288 at NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session, QueryParameters queryParameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Hql\Ast\ANTLR\QueryTranslatorImpl.cs:line 109 at NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters, ISessionImplementor session, IList results) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Engine\Query\HQLQueryPlan.cs:line 89 at NHibernate.Impl.SessionImpl.List(IQueryExpression queryExpression, QueryParameters queryParameters, IList results) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Impl\SessionImpl.cs:line 659 at NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression, QueryParameters parameters) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Impl\AbstractSessionImpl.cs:line 92 at NHibernate.Impl.ExpressionQueryImpl.List() in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Impl\ExpressionQueryImpl.cs:line 58 at NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(NhLinqExpression nhLinqExpression, IQuery query, NhLinqExpression nhQuery) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Linq\DefaultQueryProvider.cs:line 103 at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Linq\DefaultQueryProvider.cs:line 35 at NHibernate.Linq.DefaultQueryProvider.Execute[TResult](Expression expression) in c:\Users\sebros\Documents\My Projects\nhibernate-core\src\NHibernate\Linq\DefaultQueryProvider.cs:line 40 at Remotion.Linq.QueryableBase1.GetEnumerator() in :line 0 at Orchard.Indexing.Services.IndexingTaskManager.CreateTask(ContentItem contentItem, Int32 action) at Orchard.Indexing.Services.IndexingTaskManager.CreateUpdateIndexTask(ContentItem contentItem) at Orchard.Indexing.Settings.EditorEvents.CreateTasksForType(String type) at Orchard.Indexing.Settings.EditorEvents.CreateIndexingTasks() at Orchard.Indexing.Settings.EditorEvents.<TypeEditorUpdate>d__4.MoveNext() at Orchard.Events.DefaultOrchardEventBus.<NotifyHandlers>d__0.MoveNext() in e:\01 CODE\TurkLine\Metalyapi\src\Orchard\Events\DefaultOrchardEventBus.cs:line 43 at System.Linq.Buffer
1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source) at Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary2 eventData) in e:\01 CODE\TurkLine\Metalyapi\src\Orchard\Events\DefaultOrchardEventBus.cs:line 27 at Orchard.Events.EventsInterceptor.Intercept(IInvocation invocation) in e:\01 CODE\TurkLine\Metalyapi\src\Orchard\Events\EventsInterceptor.cs:line 26 at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.IContentDefinitionEditorEventsProxy.TypeEditorUpdate(ContentTypeDefinitionBuilder builder, IUpdateModel updateModel) at Orchard.ContentTypes.Services.ContentDefinitionService.<>c__DisplayClass10.<AlterType>b__7(ContentTypeDefinitionBuilder typeBuilder) at Orchard.ContentManagement.MetaData.ContentDefinitionManagerExtensions.AlterTypeDefinition(IContentDefinitionManager manager, String name, Action
1 alteration) in e:\01 CODE\TurkLine\Metalyapi\src\Orchard\ContentManagement\MetaData\IContentDefinitionManager.cs:line 26 at Orchard.ContentTypes.Services.ContentDefinitionService.AlterType(EditTypeViewModel typeViewModel, IUpdateModel updateModel) at Orchard.ContentTypes.Controllers.AdminController.EditPOST(String id) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass48.b__41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass48.b__41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass48.b__41()
I am using Orchard 1.8.1