Defect #9904
closed
500 Internal Server Error when Issues->filter by custom field of type list.
Added by Mike Dubman almost 13 years ago.
Updated almost 13 years ago.
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
- 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.
- Status changed from Closed to Reopened
What do you suggest to trace this issue? It is always reproducible on our fresh setup.
Please suggest
- Description updated (diff)
You can attach your app/models/query.rb here.
attached.
Also, I have many plugins installed, maybe some of them overloading sql_for_field func?
thanks
$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)
Try to uninstall the plugin then?
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?
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?
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
cannot update issue to Resolved, same resolution like in #9926
- Status changed from Reopened to Closed
- Resolution changed from Cant reproduce to Invalid
Also available in: Atom
PDF