Please help us help you and fill where relevant:
Your LimeSurvey version: 6.4.12
Own server or LimeSurvey hosting: ISS On prem
Survey theme/template:
==================
Hi,
After the db upgrade when I try to load the login page I'm getting this error page messageCExceptionInvalid fruity_twentythree template directory
looking at the logs, I can see error was in the sql on the Order By specifying the template_name 2x
[error] [system.db.CDbCommand] CDbCommand::fetchAll() failed: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]A column has been specified more than once in the order by list. Columns in the order by list must be unique.. The SQL statement executed was: SELECT [t].[template_name] AS [t0_c1], [t].[id] AS [t0_c0], [template].[id] AS [t1_c0], [template].[name] AS [t1_c1], [template].[folder] AS [t1_c2], [template].[title] AS [t1_c3], [template].[creation_date] AS [t1_c4], [template].[author] AS [t1_c5], [template].[author_email] AS [t1_c6], [template].[author_url] AS [t1_c7], [template].[copyright] AS [t1_c8], [template].[license] AS [t1_c9], [template].[version] AS [t1_c10], [template].[api_version] AS [t1_c11], [template].[view_folder] AS [t1_c12], [template].[files_folder] AS [t1_c13], [template].[description] AS [t1_c14], [template].[last_update] AS [t1_c15], [template].[owner_id] AS [t1_c16], [template].[extends] AS [t1_c17] FROM [dbo].[lime_template_configuration] [t] LEFT OUTER JOIN [dbo].[lime_templates] [template] ON ([template].[name]=[t].[template_name]) ORDER BY template_name, [t].[template_name].
[error] [exception.CDbException] CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]A column has been specified more than once in the order by list. Columns in the order by list must be unique. in C:\inetpub\wwwroot\limesurvey\vendor\yiisoft\yii\framework\db\CDbCommand.php:543