首先我没有页面的搜索结果,即使它们在索引中。我删除了索引,创建了新索引,并希望向其添加页面内容类型,但现在当我保存时,我收到以下错误:
发生了未处理的异常,请求已终止。请刷新页面。如果错误仍然存在,请返回
无法执行查询[选择indexingta0_.Id如Id154_,indexingta0_.Action如Action154_,indexingta0_.CreatedUtc如CreatedUtc154_,indexingta0_.ContentItemRecord_id如ContentI4_154_从Orchard_Indexing_IndexingTaskRecord indexingta0_其中indexingta0_.ContentItemRecord_id=@p0]名称:P1 - 值:果园.ContentManagement.Records.ContentItemRecord [SQL:选择indexingta0_.Id如Id154_,indexingta0_.Action如Action154_,indexingta0_.CreatedUtc如CreatedUtc154_,indexingta0_.ContentItemRecord_id如ContentI4_154_从Orchard_Indexing_IndexingTaskRecord indexingta0_其中indexingta0_.ContentItemRecord_id=@p0]
NHibernate.Exceptions.GenericADOException:无法执行查询[选择indexingta0_.Id如Id154_,indexingta0_.Action如Action154_,indexingta0_.CreatedUtc如CreatedUtc154_,indexingta0_.ContentItemRecord_id如ContentI4_154_从Orchard_Indexing_IndexingTaskRecord indexingta0_其中indexingta0_.ContentItemRecord_id=@p0]名称:p1 - 值:Orchard.ContentManagement.Records.ContentItemRecord [SQL:选择indexingta0_.Id为Id154_,indexingta0_.Action为Action154_,indexingta0_.CreatedUtc为CreatedUtc154_,indexingta0_.ContentItemRecord_id为ContentI4_154_,来自Orchard_Indexing_IndexingTaskRecord indexingta0_ where indexingta0_.ContentItemRecord_id=@p0] ---> System.Data.SqlClient.SqlException:无效的对象名称' Orchard_Indexing_IndexingTaskRecord'。声明无法准备。在System.Data.SqlClient.SqlConnection.OnError(SqlException异常,布尔breakConnection,动作1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction)在System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj,布尔callerHasConnectionLock,布尔asyncClose)在System.Data .SqlClient.TdsParser.TryRun(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj,Boolean& dataReady)System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()at System.Data.SqlClient.SqlDataReader.get_MetaData() 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, System.Data.SqlClient.SqlCommand.RunExecuteReader(命令)中的布尔asyncWrite,SqlDataReader ds)行为cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String方法,TaskCompletionSource 1 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)在c:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \ src \ NHibernate \ Loader \ Loader .cs:第1465行,位于c:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \ src \ NHibernate \ Hql \ Ast的NHibernate.Hql.Ast.ANTLR.Loader.QueryLoader.List(ISessionImplementor session,QueryParameters queryParameters) \ ANTLR \ Loader \ QueryLoader.cs:位于c:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \ src \ NHibernate中的NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.List(ISessionImplementor session,QueryParameters queryParameters)的第288行\ Hql \ Ast \ ANTLR \ QueryTranslatorImpl.cs:位于c:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \的NHibernate.Engine.Query.HQLQueryPlan.PerformList(QueryParameters queryParameters,ISessionImplementor session,IList results)的第109行src \ NHibernate \ Engine \ Query \ HQLQueryPlan.cs:NHibernate.Impl.SessionImpl.List中的第89行(IQueryExpression q ueryExpression,QueryParameters queryParameters,IList results)在c:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \ src \ NHibernate \ Impl \ SessionImpl.cs:第659行NHibernate.Impl.AbstractSessionImpl.List(IQueryExpression queryExpression,QueryParameters参数)在c:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \ src \ NHibernate \ Impl \ AbstractSessionImpl.cs:第92行,位于c:\ Users \ sebros \ Documents中的NHibernate.Impl.ExpressionQueryImpl.List() \我的项目\ NHibernate的核\ SRC \ NHibernate的\默认地将Impl \ ExpressionQueryImpl.cs:线58在NHibernate.Linq.DefaultQueryProvider.ExecuteQuery(nhLinqExpression nhLinqExpression,IQUERY查询,nhLinqExpression nhQuery)在C:\用户\ sebros \ Documents \我的项目\ nhibernate-core \ src \ NHibernate \ Linq \ DefaultQueryProvider.cs:位于c:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \ src \ NHibernate \中的NHibernate.Linq.DefaultQueryProvider.Execute(表达式)的第103行Linq \ DefaultQueryProvider.cs:NHibernate.Linq.DefaultQueryProvider.Execute [T]第35行结果](表达式表达式)在C:\ Users \ sebros \ Documents \ My Projects \ nhibernate-core \ src \ NHibernate \ Linq \ DefaultQueryProvider.cs:第40行Remotion.Linq.QueryableBase 1.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 (IEnumerable 1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1个来源)在e:\ 01 CODE \ TurkLine \ Metalyapi \ src \ Orchard \ ContentManagement \ MetaData \中的Orchard.Events.DefaultOrchardEventBus.Notify(String messageName,IDictionary 2 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个更改) IContentDefinitionManager.cs:线26在Orchard.ContentTypes.Services.ContentDefinitionService.AlterType(EditTypeViewModel typeViewModel,IUpdateModel的UpdateModel)在Orchard.ContentTypes.Controllers.AdminController.EditPOST(字符串ID)在lambda_method在系统(封闭,ControllerBase,对象[]) System.Web.Mvc.Async.AsyncControllerActionInvoker上的System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary 2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2个参数)中的.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller,Object []参数) .b__39(IAsyncResult asyncResult,ActionInvocation innerInvokeS泰特)在System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult 2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase
1.End()在System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult的asyncResult)在System.Web.Mvc.Async.AsyncControllerActionInvoker System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters中的System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters。&lt;&gt; c__DisplayClass48.b__41()中的.AsyncInvocationWithFilters.b__3f()。&lt;&gt; c__DisplayClass48.b__41()在System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters。&lt;&gt; c__DisplayClass48.b__41()
我正在使用Orchard 1.8.1
答案 0 :(得分:0)
好的,我找到了。 整个Orchard DB在本地设置,所有表的模式都是dbo。
然后我将它发布到我的托管,并在那里启用了搜索模块。我的托管在我的用户名模式下创建了新表,所以它是
[myusername].[Orchard_Indexing_IndexingTaskRecord]
代替
[dbo].[Orchard_Indexing_IndexingTaskRecord]