Hello experts!
I'm very new to Prestashop but I have some experience in SQL. I have recently upgraded to PrestaShop 1.7.7.2 and whenever I open the customers tab, I keep getting this error:
An exception occurred while executing 'SELECT c.id_customer, c.firstname, c.lastname, c.email, c.active, c.newsletter, c.optin, c.date_add, gl.name as social_title, s.name as shop_name, c.company, (SELECT SUM(total_paid_real / conversion_rate) FROM ps_orders o WHERE (o.id_customer = c.id_customer) AND (o.id_shop IN (?)) AND (o.valid = 1)) as total_spent, (SELECT con.date_add FROM ps_guest g LEFT JOIN ps_connections con ON con.id_guest = g.id_guest WHERE g.id_customer = c.id_customer ORDER BY con.date_add DESC LIMIT 1) as connect FROM ps_customer c LEFT JOIN ps_gender_lang gl ON c.id_gender = gl.id_gender AND gl.id_lang = ? LEFT JOIN ps_shop s ON c.id_shop = s.id_shop WHERE (c.deleted = 0) AND (c.id_shop IN (?)) AND (`firstname` LIKE ?) AND (`lastname` LIKE ?) AND (`email` LIKE ?) AND (c.date_add >= ? AND c.date_add <= ?) AND (c.date_add >= ?) ORDER BY c.id_customer desc LIMIT 50' with params [1, 1, 1, "%JohnDoe%", "%JohnDoe%", "%[email protected]%", "2024-10-23 0:0:0", " 23:59:59", "2024-10-23 0:0:0"]: SQLSTATE[HY000]: General error: 1525 Incorrect DATETIME value: ' 23:59:59'
[Doctrine\DBAL\Exception\DriverException 0]
With debug mode: Notice: Undefined index: to
From my understanding, it seems that the query is using " 23:59:59" as a parameter, and is not in a suitable datetime format. I believe it should be doing something like "2024-10-23 23:59:59". When I take a look at the php file, it doesn't seem like to is undefined.
How can I address this issue? I would greatly appreciate help.