Defect #30284

Internal Server Error When Deleting a User

Added by Nigel Wilson over 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:4.0.0


When deleting a user an Internal Server Error is generated, and the user account does not get deleted.

Error from log:

Started DELETE "/users/341" for x.x.x.x at 2018-12-27 08:41:07 -0500
Processing by UsersController#destroy as HTML
  Parameters: {"authenticity_token"=>"", "id"=>"341"}
  Current user: (id=3)
Completed 500 Internal Server Error in 302ms (ActiveRecord: 284.1ms)

ActiveRecord::StatementInvalid (
TinyTds::Error: The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP, OFFSET or FOR XML is also specified.:

EXEC sp_executesql N'DELETE FROM [custom_values] WHERE [custom_values].[id] IN (SELECT [custom_values].[id] FROM [custom_values] LEFT OUTER JOIN [custom_fields] ON
[custom_fields].[id] = [custom_values].[custom_field_id] WHERE [custom_values].[customized_id] = @0 AND [custom_values].[customized_type] = @1  ORDER BY
custom_fields.position); SELECT @@ROWCOUNT AS AffectedRows', N'@0 int, @1 nvarchar(30)', @0 = 341, @1 = N'Principal'):

  Redmine version                4.0.0.devel
  Ruby version                   2.5.3-p105 (2018-10-18) [x64-mingw32]
  Rails version                  5.2.2
  Environment                    production
  Database adapter               SQLServer
  Database version               SQL Server 2012
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
  Git                            2.20.0
Redmine plugins:
  redmine_agile                  1.4.7

Related issues

Related to Redmine - Defect #30285: Microsoft SQL server support is broken Closed


#1 Updated by Go MAEDA over 3 years ago

  • Related to Defect #30285: Microsoft SQL server support is broken added

#2 Updated by Go MAEDA over 3 years ago

Redmine 4.0.0 does not work with Microsoft SQL Server for now. Please see #30285 for details.

#3 Updated by Go MAEDA over 2 years ago

  • Status changed from New to Closed

The issue is going to be fixed in the upcoming Redmine 4.1.1 and 4.0.7 (#30285).

Also available in: Atom PDF