gpt4 book ai didi

sitecore - WFFM - 验证码 - 值不能为空

转载 作者:行者123 更新时间:2023-12-02 21:47:49 30 4
gpt4 key购买 nike

我正在使用 Sitecore 8 update 3,目前我向 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 的建议)之后。我更新了 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();
});

感谢对此的任何想法。谢谢

最佳答案

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

  • 将以下节点添加到 Web.config:
  • <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" />

    • 对于 IIS 6.x,位于configuration\system.web\httpHandlers 节点下
    • 对于 IIS 7.x 及更高版本,位于configuration\system.webServer\handlers 节点下

    关于sitecore - WFFM - 验证码 - 值不能为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39139672/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com