当用户尝试注册

时间:2017-07-05 08:43:35

标签: php apache http magento magento-1.9

我有Magento 1.9.3.2版。当用户想要注册时,它会生成内部服务器错误(HTTP错误代码500)。用户接收电子邮件,但已注册

如果我重新加载页面,它会显示消息"感谢您注册" 并且帐户页面已打开。

我检查了Magento和Apache的日志 - 没有。

有人知道如何解决这个问题吗?

更新。 我在index.php文件中打开了display_errors。我收到了消息:

[05-Jul-2017 09:09:01 UTC] PHP致命错误:在/ home / some / public_html / some / app / code / community / Fooman / EmailAttachments /中调用null上的成员函数getPayment()第34行的模型/核心/电子邮件/模板/ Mailer.php

第34行是这样的: $ paymentMethod = $ this-> getTemplateParams()[' order'] - > getPayment() - > getData(" method");

所以似乎有一个块" Fooman"它在未初始化时尝试使用该类的实例。

有人对这个扩展Fooman有所了解吗?

更新。 似乎这个代码解决了这个问题。对于注册,我检查用户是否有课程实例,如果他没有,我使用标准模板。

//here check if have instance of class
            if (isset($this->getTemplateParams()['order']))
            {
                //here 34 string where error occure
                $paymentMethod = $this->getTemplateParams()['order']->getPayment()->getData("method");

                if ($this->getTemplateId() == '1') {
                    switch($paymentMethod) {
                        case 'banktransfer':
                            $templateId = 9;
                            break;

                        case 'paypal_express':
                            $templateId = 8;

                        default:
                            $templateId = $this->getTemplateId();
                            break;
                    }
                } else {

                    $templateId = $this->getTemplateId();
                }
            }
            else {
                $templateId = $this->getTemplateId();
            }

2 个答案:

答案 0 :(得分:0)

有些时候文件未找到Emogrifier.php下面的路径

magento Root / lib / Pelago / Emogrifier.php

检查此文件是否存在,如果不存在则从新鲜的magento下载并将其放到那里。

清除缓存并尝试。

答案 1 :(得分:0)

如果您收到内部服务器错误500,则必须启用显示错误。

转到plt.pcolormesh( X,Y,H/float(len(time)) ) 并替换代码

fig = plt.figure()
X,Y = np.meshgrid(intensity_bins,range_bins)
pc = plt.pcolormesh(X,Y,H/float(len(time)), cmap=radar_map)

cax = fig.add_axes([0.90, 0.2, 0.02, 0.6])
cb = plt.colorbar(pc, cax=cax)

逐一使用。