Vote #81200
未完了Error on issue validation
0%
説明
When I open a new issue, the data validation (type and required data) works perfectly. If for example I write a character in a numeric field or don't fill a required field I receive the normal red box with the error.
After status changes, if the helpdesk or another assigner writes something wrong or doesn't fill a required field I receive the following error:
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.If you are the Redmine administrator, check your log files for details about the error.
Below the production.log generated part:
Started PATCH "/issues/1884" for 172.24.112.4 at 2020-12-21 18:20:35 +0100 Processing by IssuesController#update as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"WrsdDIM7eYhFTkjqMBQW2swULoE38w4FOd3Rwmso0DelQJivomeJW8u1yMJ7Mg78MOKkCxxRy39qjqGYKIgF6w==", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "project_id"=>"15", "author_id"=>"5", "tracker_id"=>"11", "subject"=>"cvbn", "description"=>"dxcvbnmvcxzvhgjfx", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "custom_field_values"=>{"13"=>"Redmine Interno", "17"=>"dcvbn", "18"=>"", "19"=>"", "20"=>"15 giorni - Richiesta ordinaria", "21"=>"", "22"=>"Estratto conto ex art. 50", "23"=>"", "24"=>"2019-11-16", "25"=>"2019-11-16", "26"=>"", "27"=>"2019-11-16", "28"=>"2019-11-16", "30"=>"Tasso Legale", "29"=>"", "31"=>"12345", "32"=>{"blank"=>""}}, "notes"=>"", "private_notes"=>"0", "lock_version"=>"1"}, "was_default_status"=>"1", "last_journal_id"=>"", "commit"=>"Invia", "next_issue_id"=>"557", "issue_position"=>"1", "issue_count"=>"3", "id"=>"1884"} Current user: Administrator (id=1) Rendering issues/edit.html.erb within layouts/base Rendered attachments/_form.html.erb (2.6ms) Rendered issues/_form_custom_fields.html.erb (15.3ms) Rendered issues/_attributes.html.erb (41.6ms) Rendered issues/_form.html.erb (58.2ms) Rendered issues/_edit.html.erb (66.3ms) Rendered issues/edit.html.erb within layouts/base (68.7ms) Completed 500 Internal Server Error in 168ms (ActiveRecord: 9.6ms) ActionView::Template::Error (undefined method `any?' for nil:NilClass): 40: 41: 42:
journals
--------------------------------------------------------------------------------
We really need more info about your environment, please see [[submissions]].
--------------------------------------------------------------------------------
Have you modified the source code of Redmine?
The error log indicates that line 43 of app/views/issues/_edit.html.erb is the following.
<pre>
<% if @attachments.any? && @issue.safe_attribute?('deleted_attachment_ids') %>
</pre>
But in the original app/views/issues/_edit.html.erb, line 43 is as follows (@@attachments.any?@ should be @@issue.attachments.any?@).
<pre>
<% if @issue.attachments.any? && @issue.safe_attribute?('deleted_attachment_ids') %>
</pre>
--------------------------------------------------------------------------------