【问题标题】:form not submitting on magento 1.9.0.1, giving 404 error page on submit表单未在 magento 1.9.0.1 上提交,提交时出现 404 错误页面
【发布时间】:2019-05-08 05:27:45
【问题描述】:

我创建了一个名为 Contact 的 CMS 页面,并在其中使用了以下代码:

{{block type='core/template' name='contactForm' template='contacts/form.phtml'}}

https://www.peterwynnscore.com.au/contact/ 显示联系表格的页面,但是当我提交时,它只是刷新页面并且什么都不做。我检查了表单操作,它是空白的,所以我编辑了我的"/contacts/form.phtml" 文件并将其添加到操作"/contacts/index/post" 中,但是当我提交表单时它给出了404 error 页面。这可能是什么问题?

我检查了我的错误日志"var/log/system.log"它给了我这个error: ERR (3): Notice: Use of undefined constant tmp - assumed 'tmp' in lib/Zend/Cache.php on line 153

我不知道表单操作 URL 有什么问题。很感谢任何形式的帮助。谢谢!

【问题讨论】:

    标签: magento contact-form


    【解决方案1】:

    您在其中缺少form action。加form_action="{{store direct_url='contacts'}}/index/post"点赞

    {{block type="core/template" name="contactForm" form_action="{{store direct_url='contacts'}}/index/post" template="contacts/form.phtml"}}
    

    然后尝试。

    【讨论】:

    • 我直接在 form.phtml 文件中添加了表单动作。是一样的,是吗?
    • 尝试使用完整的商店网址进行操作。
    猜你喜欢
    • 2017-08-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-25
    相关资源
    最近更新 更多