【发布时间】:2016-10-08 02:36:40
【问题描述】:
我正在使用 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();
});
感谢您对此的任何想法。谢谢
【问题讨论】:
-
到目前为止,您做了什么来尝试解决它?
-
您是否按照安装说明对
web.config进行了必要的修改以添加CaptchaImage和CaptchaAudio处理程序? -
@jammykam,是的,我做到了