Defect #9904
closed500 Internal Server Error when Issues->filter by custom field of type list.
0%
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
Updated by Jean-Philippe Lang almost 13 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.
Updated by Mike Dubman almost 13 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
Updated by Jean-Philippe Lang almost 13 years ago
- Description updated (diff)
You can attach your app/models/query.rb here.
Updated by Mike Dubman almost 13 years ago
attached.
Also, I have many plugins installed, maybe some of them overloading sql_for_field func?
thanks
Updated by Mike Dubman almost 13 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)
Updated by Mike Dubman almost 13 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?
Updated by Etienne Massip almost 13 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?
Updated by Mike Dubman almost 13 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
Updated by Mike Dubman almost 13 years ago
cannot update issue to Resolved, same resolution like in #9926
Updated by Etienne Massip almost 13 years ago
- Status changed from Reopened to Closed
- Resolution changed from Cant reproduce to Invalid