I’m getting a critical error after login form validation, which happens both for successful and failed logins. It appears that the Audit Trail insert query is to blame. From the log file:
[2026-02-09T11:45:12.765874+00:00] app.DEBUG: Executing query: INSERT INTO [AuditTrail] ([DateTime], [Script], [User], [Action], [Table], [Field], [KeyValue], [OldValue], [NewValue]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) {"params":{"1":"2026-02-09 13:45:12.755419","2":"/app_v2026/login1fa","3":"Administrator","4":"login","5":"127.0.0.1","6":"","7":"","8":null,"9":null},"types":{"1":{"Doctrine\\DBAL\\ParameterType":0},"2":{"Doctrine\\DBAL\\ParameterType":0},"3":{"Doctrine\\DBAL\\ParameterType":0},"4":{"Doctrine\\DBAL\\ParameterType":0},"5":{"Doctrine\\DBAL\\ParameterType":0},"6":{"Doctrine\\DBAL\\ParameterType":0},"7":{"Doctrine\\DBAL\\ParameterType":0},"8":{"Doctrine\\DBAL\\ParameterType":0},"9":{"Doctrine\\DBAL\\ParameterType":0}}} []
[2026-02-09T11:45:12.783254+00:00] app.DEBUG: INSERT INTO [AuditTrail] ([DateTime], [Script], [User], [Action], [Table], [Field], [KeyValue], [OldValue], [NewValue]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) {"params":{"1":"2026-02-09 13:45:12.755419","2":"/app_v2026/login1fa","3":"Administrator","4":"login","5":"127.0.0.1","6":"","7":"","8":null,"9":null},"types":{"1":{"Doctrine\\DBAL\\ParameterType":0},"2":{"Doctrine\\DBAL\\ParameterType":0},"3":{"Doctrine\\DBAL\\ParameterType":0},"4":{"Doctrine\\DBAL\\ParameterType":0},"5":{"Doctrine\\DBAL\\ParameterType":0},"6":{"Doctrine\\DBAL\\ParameterType":0},"7":{"Doctrine\\DBAL\\ParameterType":0},"8":{"Doctrine\\DBAL\\ParameterType":0},"9":{"Doctrine\\DBAL\\ParameterType":0}},"executionMS":0.01732802391052246} []
[2026-02-09T11:45:12.791655+00:00] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing a query: SQLSTATE [22007, 241]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting date and/or time from character string." at ExceptionConverter.php line 46 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 241): An exception occurred while executing a query: SQLSTATE [22007, 241]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting date and/or time from character string. at C:/DEVELOPMENT/WEBROOT/app_v2026/vendor/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php:46)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\SQLSrv\\Exception\\Error(code: 241): SQLSTATE [22007, 241]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting date and/or time from character string. at C:/DEVELOPMENT/WEBROOT/app_v2026/vendor/doctrine/dbal/src/Driver/SQLSrv/Exception/Error.php:38)"} []
[2026-02-09T13:45:12.920574+02:00] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
I’m using v2026.6 and MS SQL Server, which apparently doesn’t like too many decimals in the datetime string. In Management Studio, this query fails:
INSERT INTO [AuditTrail] ([DateTime], [Script], [User], [Action], [Table], [Field], [KeyValue], [OldValue], [NewValue]) VALUES ('2026-02-09 13:45:12.755419','/app_v2026/login1fa','Administrator','login','127.0.0.1','','',null,null)
…as this one, with just three decimal digits, works:
INSERT INTO [AuditTrail] ([DateTime], [Script], [User], [Action], [Table], [Field], [KeyValue], [OldValue], [NewValue]) VALUES ('2026-02-09 13:45:12.755','/app_v2026/login1fa','Administrator','login','127.0.0.1','','',null,null)