Defect #9926
closed
export issues to csv fails
Added by Mike Dubman almost 13 years ago.
Updated almost 13 years ago.
Description
Processing IssuesController#index to csv (for 10.220.3.218 at 2012-01-05 11:26:04) [GET]
Parameters: {"format"=>"csv", "project_id"=>"fca", "action"=>"index", "controller"=>"issues", "columns"=>"all"}
NoMethodError (undefined method `formatted_questions' for #<Issue:0x2aaaab5db300>):
app/helpers/issues_helper.rb:283:in `send'
app/helpers/issues_helper.rb:283:in `issues_to_csv'
app/helpers/issues_helper.rb:278:in `collect'
app/helpers/issues_helper.rb:278:in `issues_to_csv'
app/helpers/issues_helper.rb:277:in `each'
app/helpers/issues_helper.rb:277:in `issues_to_csv'
lib/faster_csv.rb:1053:in `generate'
app/helpers/issues_helper.rb:271:in `issues_to_csv'
app/controllers/issues_controller.rb:97:in `index'
app/controllers/issues_controller.rb:91:in `index'
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)
What's the "formatted_questions" referring to?
Do you have such a column selected in the query columns?
Etienne Massip wrote:
What's the "formatted_questions" referring to?
Do you have such a column selected in the query columns?
dont have such column, from the error it seems like formatted_questions is a method.
#grep -rn formatted_questions *
question_plugin/spec/lib/question_queries_helper_patch_spec.rb:94: column = mock_model(QueryColumn, :name => :formatted_questions)
question_plugin/spec/lib/question_queries_helper_patch_spec.rb:105: next if column.name :formatted_questions
question_plugin/lang/de.yml:4:field_formatted_questions: Fragen
question_plugin/lang/en.yml:4:field_formatted_questions: Questions
question_plugin/lib/question_query_patch.rb:12: base.add_available_column(QueryColumn.new(:formatted_questions))
question_plugin/lib/question_queries_helper_patch.rb:20: if column.name :formatted_questions
question_plugin/lib/question_layout_hooks.rb:8:td.formatted_questions { text-align: left; white-space: normal}
question_plugin/lib/question_layout_hooks.rb:9:td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
question_plugin/config/locales/de.yml:5: field_formatted_questions: Fragen
question_plugin/config/locales/en.yml:5: field_formatted_questions: Questions
Yes, it's an accessor method to a DB column value.
Try to remove all the 'formatted_questions' you might find in the column_names
column of the queries
table?
there is no such value for "column_names" field in the queries table:
mysql> select column_names from queries;
+------------------------------------------------------------------------------------------------------------------------------------------------------+
| column_names |
+------------------------------------------------------------------------------------------------------------------------------------------------------+
| ---
- :status
- :priority
- :subject
- :author
- :assigned_to
- :updated_on
- :category
- :fixed_version
- :done_ratio
|
| ---
- :status
- :priority
- :subject
- :author
- :assigned_to
- :updated_on
- :category
- :fixed_version
- :done_ratio
|
| ---
- :tracker
- :status
- :priority
- :subject
- :author
- :assigned_to
- :category
- :fixed_version
- :done_ratio
|
| NULL |
| NULL |
| NULL |
| NULL |
| NULL |
| NULL |
| ---
- :fixed_version
- :category
- :status
- :priority
- :subject
- :assigned_to
- :done_ratio
|
| ---
- :fixed_version
- :category
- :status
- :priority
- :subject
- :assigned_to
- :done_ratio
|
| NULL |
| NULL |
| NULL |
| NULL |
| ---
- :status
- :priority
- :subject
- :assigned_to
- :category
- :fixed_version
|
| ---
- :tracker
- :status
- :priority
- :subject
- :assigned_to
- :category
- :fixed_version
|
| NULL |
| NULL |
| ---
- :status
- :priority
- :subject
- :assigned_to
- :category
- :fixed_version
|
| ---
- :project
- :parent
- :status
- :priority
- :subject
- :assigned_to
- :category
- :fixed_version
- :due_date
- :estimated_hours
- :done_ratio
|
I did "grep formatted_questions" inside mysqldump file and found nothing
- Status changed from New to Resolved
found a reason for failure:
I have copied inactive plugins under vendor/plugin/inactive folder.
once removed - all works fine
10x
- Status changed from Resolved to Closed
- Resolution set to Invalid
Also available in: Atom
PDF