プロジェクト

全般

プロフィール

Vote #81200

未完了

Error on issue validation

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Needs feedback
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
0
issue_org_id:
34484
author_id:
460226
assigned_to_id:
0
comments:
3
status_id:
10
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
148
ステータス-->[Needs feedback]

説明

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:       
"><%= l(:label_attachment_plural) %> 43: <% if @attachments.any? && @issue.safe_attribute?('deleted_attachment_ids') %> 44:
<%= link_to l(:label_edit_attachments), '#', :onclick => "$('#existing-attachments').toggle(); return false;" %>
45:
46: <% @attachments.each do |attachment| %> app/views/issues/_edit.html.erb:43:in `block in _app_views_issues__edit_html_erb__169474526129585408_70197454896560' app/helpers/application_helper.rb:1242:in `labelled_form_for' app/views/issues/_edit.html.erb:1:in `_app_views_issues__edit_html_erb__169474526129585408_70197454896560' app/views/issues/edit.html.erb:3:in `_app_views_issues_edit_html_erb__3897739985162189416_70197464417020' app/controllers/issues_controller.rb:194:in `block (2 levels) in update' app/controllers/issues_controller.rb:193:in `update' lib/redmine/sudo_mode.rb:63:in `sudo_mode'

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>
--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリIssues_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0