Sitecore:'/'应用程序中的服务器错误:不允许使用空字符串。参数名称:handleId

时间:2016-05-13 04:22:27

标签: sitecore workflow sitecore8 sitecore-workflow

我的回归测试是在升级到8.0-U3到8.1-U2的Sitecore实例。一项测试是检查工作流程是否按预期正常工作。

所以我在/sitecore/templates/Sample/Sample Item节点下创建了一个名为PAGE ABC(模板:/sitecore/content/home)的新示例项。

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

PAGE 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

当我获得新信息时,我会发布更详细的调查。感谢任何帮助。感谢。

2 个答案:

答案 0 :(得分:1)

我找到了修复和根本原因。

首先,我通过在 / sitecore / system / Workflows 下创建一个新的工作流'WORKFLOW ABC'来重新创建该问题,我添加了必要的操作,例如Draft和Published,然后创建一个新的模板并指定'WORKFLOW ABC'。我还创建了一个实际项目,并尝试将项目的工作流程从“提交”更改为“已发布”。错误再次出现。 (成功复制问题

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

根本原因:

所以我比较了两个值并且存在差异,默认评论模板字段是空的(为什么我花了这么长时间才想出这个)但是存在于新安装的8.1-U2实例。

决议:

我将默认评论模板字段的值从空更改为 \ Templates \ System \ Workflow \ Standard Comment Template 并再次测试并且它可以正常工作。

易于观察的屏幕截图: Sample workflow with empty Default Comment Template field

您可能还想将默认注释对话框高度字段值更新为250,但这个值是可选的。

答案 1 :(得分:0)

<强> EDITED 因为在更改主数据库时,工作流程正常工作。然后问题来自项目。您可以检查工作流的模板是否与工作实例相比是否相同。

路径为src/main/resources

相关问题