Magento 2.0.5 – Fix Class ‘Magento\Framework\Data\Form\Filter\Datetime’ Not Found

customermagento-2.0.5

I have a M2 install with data migrated over using the data migration tool. I have no extra modules or extensions enabled.

When I try to save a customer's data from the Admin, I simply get a blank screen, and this error in the PHP Log:

PHP Fatal error:  Class 'Magento\Framework\Data\Form\Filter\Datetime' not found in <magento-root>/vendor/magento/module-customer/Model/Metadata/Form/AbstractData.php on line 214

Is this a bug, or perhaps something wrong with installation?

Update

Based on suggestions below, I searched the entire Magento install (files and DB) for Filter\Datetime in the files, and \Datetime in the database, and that turned up nothing. That suggests to me that Magento is building a reference to Magento\Framework\Data\Form\Filter\Datetime dynamically, but I'm not sure how to track that down.

Update 2

I've managed to narrow it down to Magento trying to validate a field called "created_at" when saving a customer. I've confirmed that this field is getting assigned an input_filter of datetime, but I don't know where this gets set.

Best Answer

With the help of some of the comments, I discovered that when saving a Customer, a field called created_at was looking for a class datetime for validation. However, there is no filter for datetime validation.

Going into the database, I found in table customer_eav_attribute the column input_filter. Changing datetime to date for the relevant attribute fixed this specific problem.

(however, it did introduce a problem with the formatting of the date)

Related Topic