一旦您的日志显示了该错误,就可以更轻松地隔离出有问题的代码.为此,您可能需要记录数据库查询,但不幸的是,如果数据量很大和/或受到隐私保护,这可能会很棘手.I'm attempting to track down the cause of a rare bug (love those intermittent bugs) where a customer selects to Register at time of checkout, but when the order is completed, Magento somehow fails to save the customer record. This results in an orphan order with no email address, a difficult customer service situation. Here are the results of my investigations so far: The Sales Order View in adminhtml reports that the customer is a Guest and the email address is blank. Billing and Shipping addresses are visible.customer_is_guest is false in sales_flat_orderThe sales_flat_order entry links to a valid record in sales_flat_order_address. The sales_flat_order_address record contains values for customer_id and customer_address_id however those linked records do not exist.There is no discernible pattern in customer information, products ordered, payment methods.There are no relevant entries in system.log, exception.log, apache error logs, var/reports or any other logs that I'm aware of.Thoughts: the customer save is progressing far enough that an ID is generated. there is an observer on customer_save_after that is causing a rollback of the save?a low-level database error is causing the save to fail.Does anyone have any suggestions on how to track this down?Version is Enterprise 1.9. 解决方案 I would add lots of extra logging, try to log it well enough to capture the bug - and to save those logs if the bug can be detected.Once you have logs that show the bug, you can then isolate the problematic code more easily.For this, you may need to log the database queries, which might, unfortunately, be tricky if the volume of data is high and/or subject to privacy concerns. 这篇关于Magento为什么在生成ID后无法保存客户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-27 11:13