Hugo 表单与 JavaScript 相关的问题

发布于 2025-01-10 03:18:46 字数 521 浏览 1 评论 0原文

我遇到了一个奇怪的错误,阻止了我在 Hugo 中在 Netlify 上提交预订表格的能力(即使是在我从 0.88 升级到 0.92 之后)。

控制台错误是

Uncaught (in Promise) SyntaxError: Unexpected token < JSON 中的位置 0 罪魁祸首是baseof.html的这一点:

I am not keen to remove the IE references as unfortunately many customers may use it. If I delete those I get another problem:

404页面未找到 即使我在

Uncaught (in Promise) SyntaxError: Unexpected token p in JSON atposition 4 中有 404.html,也有这个 javascript 错误 有什么想法如何最好地处理这个问题?这看起来比 Hugo 更多地与 JS 相关,但它都带有引擎。

谢谢 阿尔弗雷德

I got a weird error blocking my ability in Hugo to submit a booking form ( even after I upgraded from 0.88 to 0.92 ) on Netlify.

The console error is

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
and the culprit is this bit of baseof.html:

I am not keen to remove the IE references as unfortunately many customers may use it.
If I delete those I get another problem:

404 page not found
with this javascript error even though I have 404.html in

Uncaught (in promise) SyntaxError: Unexpected token p in JSON at position 4
Any ideas how best to deal with this? This appears more JS related than Hugo but it all comes with the engine.

Thanks
Alfred

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文