WFFM - Capcha - 值不能为空

时间:2016-08-25 07:56:30

标签: sitecore sitecore8

我使用的是Sitecore 8更新3,目前我添加了一个capcha到WFFM表单并按下音频,但显示错误如下:

[ArgumentNullException: Value cannot be null.
Parameter name: input]

       System.IO.BinaryReader..ctor(Stream input, Encoding encoding, Boolean leaveOpen) +13905648
       Sitecore.Form.Core.Media.Wave.Concat(StreamList inStreams, BinaryWriter to) +193
       Sitecore.Form.Core.Web.CaptchaAudionHandler.DoSpeech(String text, String fileName) +452
       Sitecore.Form.Core.Web.CaptchaAudionHandler.ProcessRequest(HttpContext context) +618
       Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver.ProcessRequest(HttpContext context) +358
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +508
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

我如何解决这个问题?

更新 之后我使用了名为Sitecore.Support.432676的软件包(Sitecore Climber' s)。我在CaptchaField.cshtml文件中更新了javascript,音频现在正在运行。

<script type="text/javascript">
    $scw(document).ready(function () {
        $scw('.selector-field-captcha-play').click(
            function (event) {
                event.preventDefault();
                var container = $scw(".field-captcha-audio");
                container.empty();
                container.append('<audio src="' + '@audioHandlerUrl' + "&nocache=" + Date.now() + '" autoplay="autoplay"><embed src="' + '@audioHandlerUrl' + "&nocache=" + Date.now() + '" width="180" height="90" hidden="true" /></audio>');
            }
        );
    });
</script>

但点击按钮刷新后。所有数据都是空的,因为在文件sc.fields-captcha.js中:

$scw(this.element).find(".selector-field-captcha-refresh").click(function (event) {
    event.preventDefault();
    window.location.reload();
});

感谢任何想法。感谢

1 个答案:

答案 0 :(得分:6)

请记住执行WFFM的安装后步骤的最后一步:

  1. 将以下节点添加到Web.config:
  2. <add name="CaptchaImage" verb="*" path="CaptchaImage.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />

    <add name="CaptchaAudio" verb="*" path="CaptchaAudio.axd" type="Sitecore.Form.Core.Pipeline.RequestProcessor.CaptchaResolver, Sitecore.Forms.Core" />

    • 用于配置\ system.web \ httpHandlers节点下的IIS 6.x
    • 用于IIS 7.x及以上配置\ system.webServer \ handlers节点
相关问题