2016-05-13 44 views
2

我的回归测试正在升级到8.0-U3升级到8.1-U2的Sitecore实例。其中一项测试是检查工作流是否按预期正常工作。Sitecore:'/'中的服务器错误应用程序:不允许使用空字符串。参数名称:handleId

因此,我在/sitecore/content/home节点下创建了一个名为PAGE ABC的新样本项目(模板:/sitecore/templates/Sample/Sample Item)。

页面ABC的工作流程为'示例工作流程'(模板:/sitecore/system/Workflows/Sample Workflow),它是在新安装的Sitecore实例上提供的。

页ABC没有任何问题被创造了,但是当我提交PAGE ABC,我遇到了如下一个ArgumentException:

Server Error in '/' Application. 
________________________________________ 
Empty strings are not allowed. 
Parameter name: handleId 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Empty strings are not allowed. 
Parameter name: handleId 

Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 

[ArgumentException: Empty strings are not allowed. 
Parameter name: handleId] 
    Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName) +204 
    Sitecore.Workflows.WorkflowUIHelper.ExtractFieldsFromFieldEditor(String handleId) +48 
    Sitecore.Shell.Framework.Commands.Workflow.Run(ClientPipelineArgs args) +900 

[TargetInvocationException: Exception has been thrown by the target of an invocation.] 
    System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 
    System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128 
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146 
    Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89 
    Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +313 
    Sitecore.Web.UI.Sheer.ClientPage.ResumePipeline() +224 
    Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +825 
    Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +24 
    System.Web.UI.Control.PreRenderRecursiveInternal() +197 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7763 


________________________________________ 
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0 

注意:在这种情况下,所有需要的字段都填充。我也试过把一个(1)必填字段留空,但同样的问题仍然存在。

我搜索的关键字“handleId”整个网站的参数,我发现我的\ temp文件夹_UpgradeHistory这个部分,我怀疑有事情做上述问题Sitecore.Kernel.xml

<member name="M:Sitecore.Workflows.WorkflowUIHelper.ExtractFieldsFromFieldEditor(System.String)"> 
     <summary> 
     Extract the field values set by the field editor 
     </summary> 
     <param name="handleId">The Id of the handle holding the return values from the field editor</param> 
     <returns>A NameValueCollection containg the fields</returns> 
    </member> 

我也尝试通过互联网搜索,但我没有找到任何相对的解决方案,我的问题。

编辑:我创建了一个Sitecore v.8.1-U2的新实例。将升级实例的ConnectionString.config中的主数据库替换为工作流提交操作,然后重新连接升级后的主数据库,然后再次遇到问题。

编辑:我其实也注意到工作流程的对话框有所不同。它与工作实例相比较小,这是一个更大的对话框。见支持下面的截图:

图1:不工作的工作流程

Not working workflow

图2:工作流程

Working workflow

我将发布更详细的调查时,我有新的信息。感谢任何帮助。谢谢。

+0

升级后我也面临同样的问题。在我的情况下,粘土平板电脑安装在我的sitecore中,当我提交CT3工作流程而未在评论框中添加评论时发生此错误。在我的情况下,这与自定义工作流相关。我的sitecore版本是8.1-U1。 –

+0

@marvin,当您检查元素时,在Network选项卡中,CommentEditor.aspx查询字符串“hdl”是否具有值?例如'/CommentEditor.aspx?hdl = 8027C389F0DB4976909CB3981F9FDC7A' –

+0

@HishaamNamooya,当我检查网络选项卡时,升级后的实例没有?hdl查询字符串。我也检查了新安装的8.1-U2实例,它已经存在。我还加倍检查了位于这里的物理文件:\ sitecore \ shell \ Applications \ Workbox和CommentEditor.aspx用于升级和新安装的实例是相同的。 –

回答

0

EDITED 由于更改主数据库时,工作流程工作。然后问题出现在这些项目中。你能否检查工作流的模板是否与工作实例相比相同?

Path是/sitecore/templates/System/Workflow

+0

感谢您的帮助。但是,就我而言,问题依赖于数据库,我尝试将主数据库更改为新安装的8.1-U2主数据库,并且它可以正常工作。我恢复了主数据库并且问题再次出现。我使用WinMerge检查了DLL和其他文件,我没有看到任何错误的根本原因。 –

1

我发现和修复的根本原因。

首先,我通过创建下/Sitecore的/系统的新的工作流程的工作流程ABC'重建问题/工作流程,我添加了必要的措施,如草稿和已发布,然后创建一个新的模板,并分配'工作流程ABC'。我还创建了一个实际项目,并试图将该项目的工作流程从提交更改为已发布。错误再次出现。 (成功复制问题

然后我对新安装的实例执行了相同的过程,但我无法复制该问题。

根源:

所以我比较这两个值,有一个差异,则默认评论模板场是空的(为什么花了这么长时间才想通了这一点),但现有的以新安装的8.1-U2实例。

分辨率:

我又改变了默认注释模板字段的值从空到\模板\系统\工作流程\标准注释模板测试和它的作品。

截图,方便的可视化: Sample workflow with empty Default Comment Template field

您可能还需要对话框高度字段值更新默认注释250,但是这一次是可选的。

+0

这是我解决问题的方法。但令我惊讶的是,它在默认情况下在Sitecore的新实例中为空。 –

+0

@MahendraShekhawat,很高兴知道它也适用于您。我很确定它与升级有关,我检查了新安装的Sitecore v8.1-U2并且字段填充正确。 –

+0

我认为是时候向sitecore询问这件事了。 :) –

相关问题