Project

General

Profile

Actions

Defect #9904

closed

500 Internal Server Error when Issues->filter by custom field of type list.

Added by Mike Dubman over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Happens with redmine 1.3.0 (from bitnami stack)

Processing IssuesController#index (for 172.22.237.54 at 2012-01-02 19:53:03) [GET]
  Parameters: {"v"=>{"cf_26"=>["QA"]}, "op"=>{"cf_26"=>"="}, "group_by"=>"", "project_id"=>"mxm", "set_filter"=>"1", "c"=>["project", "parent", "status", "priority", "subject", "assigned_to", "category", "fixed_version", "due_date", "done_ratio"], "action"=>"index", "f"=>["cf_26", ""], "controller"=>"issues"}

ArgumentError (wrong number of arguments (6 for 5)):
  app/models/query.rb:647:in `sql_for_field'
  app/models/query.rb:647:in `sql_for_custom_field'
  app/models/query.rb:513:in `statement'
  app/models/query.rb:493:in `each_key'
  app/models/query.rb:493:in `statement'
  app/models/query.rb:531:in `issue_count'
<pre>
  app/controllers/issues_controller.rb:82:in `index'
</pre>
  config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering /opt/redmine-1.3.0-0/apps/redmine/public/500.html (500 Internal Server Error)

Files

query.rb (31 KB) query.rb Mike Dubman, 2012-01-04 09:28
Actions #1

Updated by Jean-Philippe Lang over 12 years ago

  • Description updated (diff)
  • Status changed from New to Closed
  • Resolution set to Cant reproduce

Doesn't happen with a fresh 1.3.0, #sql_for_field accepts 6 arguments.

Actions #2

Updated by Mike Dubman over 12 years ago

  • Status changed from Closed to Reopened

What do you suggest to trace this issue? It is always reproducible on our fresh setup.
Please suggest

Actions #3

Updated by Jean-Philippe Lang over 12 years ago

  • Description updated (diff)

You can attach your app/models/query.rb here.

Actions #4

Updated by Mike Dubman over 12 years ago

attached.
Also, I have many plugins installed, maybe some of them overloading sql_for_field func?
thanks

Actions #5

Updated by Mike Dubman over 12 years ago

$grep -rHn sql_for_field *
question_plugin/lib/question_query_patch.rb:18: alias_method :sql_for_field_before_question, :sql_for_field
question_plugin/lib/question_query_patch.rb:19: alias_method :sql_for_field, :question_sql_for_field
question_plugin/lib/question_query_patch.rb:62: # Wrapper for sql_for_field so Questions can use a different table than Issues
question_plugin/lib/question_query_patch.rb:63: def question_sql_for_field(field, v, db_table, db_field, is_custom_filter)
question_plugin/lib/question_query_patch.rb:88: return sql_for_field_before_question(field, v, db_table, db_field, is_custom_filter)

Actions #6

Updated by Etienne Massip over 12 years ago

Try to uninstall the plugin then?

Actions #7

Updated by Mike Dubman over 12 years ago

Etienne Massip wrote:

Try to uninstall the plugin then?

tried - still happens, it seems that question_plugin uses a right API for sql_for_field.

Is that possible that number of arguments to pass into sql_for_field is taken from DB at some point and there it is wrong?

Actions #8

Updated by Etienne Massip over 12 years ago

Mike Dubman wrote:

tried - still happens, it seems that question_plugin uses a right API for sql_for_field.

Did you restart Redmine server instance?

Actions #9

Updated by Mike Dubman over 12 years ago

Etienne Massip wrote:

Mike Dubman wrote:

tried - still happens, it seems that question_plugin uses a right API for sql_for_field.

Did you restart Redmine server instance?

yes

Actions #10

Updated by Mike Dubman over 12 years ago

cannot update issue to Resolved, same resolution like in #9926

Actions #11

Updated by Etienne Massip over 12 years ago

  • Status changed from Reopened to Closed
  • Resolution changed from Cant reproduce to Invalid
Actions

Also available in: Atom PDF