anjlab / redmine_inline_note_images_plugin

Redmine plugin for inline note images display
12 stars 11 forks source link

When delete image from issue, Redmine has error #14

Closed dbabanov closed 11 years ago

dbabanov commented 11 years ago

Greate new issue and add image in the same window. Go to ussue, delete image and save. When we want to open this issue, we have error. Log:

Started GET "/issues/79" for x.x.x.x at 2013-05-28 17:18:33 +0400 Processing by IssuesController#show as HTML Parameters: {"id"=>"79"} Current user: snikolaev (id=17) Rendered plugins/redmine_multiple_files_upload/app/views/issues/_action_menu.html.erb (0.0ms) Rendered plugins/redmine_code_review/app/views/code_review/_issues_show_details_bottom.html.erb (0.0ms) Rendered attachments/_links.html.erb (0.0ms) Rendered issue_relations/_form.html.erb (0.0ms) Rendered issues/_relations.html.erb (0.0ms) Rendered plugins/redmine_inline_note_images_plugin/app/views/hooks/inline_image_hook/_inline_images_paste.erb (0.0ms) Rendered issues/_history.html.erb (15.6ms) Rendered issues/show.html.erb within layouts/base (31.2ms) Completed 500 Internal Server Error in 62ms

ActionView::Template::Error (undefined method image?' for nil:NilClass): 3: <% attachments.push Attachment.find_by_id a.prop_key %> 4: <% end %> 5: 6: <% images = attachments.select(&:image?) %> 7: <% if images.any? %> 8: <div class="journal attachments"> 9: <% images.each do |image| %> lib/redmine/hook.rb:111:inblock in render_on' lib/redmine/hook.rb:61:in block (2 levels) in call_hook' lib/redmine/hook.rb:61:ineach' lib/redmine/hook.rb:61:in block in call_hook' lib/redmine/hook.rb:58:intap' lib/redmine/hook.rb:58:in call_hook' lib/redmine/hook.rb:158:incall_hook' app/views/issues/_history.html.erb:19:in block in _app_views_issues__history_html_erb___555689525_64128756' app/views/issues/_history.html.erb:2:ineach' app/views/issues/_history.html.erb:2:in _app_views_issues__history_html_erb___555689525_64128756' app/views/issues/show.html.erb:124:in_app_views_issues_show_html_erb___596774311_53900088' app/controllers/issues_controller.rb:119:in block (2 levels) in show' app/controllers/issues_controller.rb:116:inshow'

dbabanov commented 11 years ago

Sorry, i forget... I use redmine 2.2.4.

dbabanov commented 11 years ago

I am so sorry, but google don't find it.... I'll try to be more attentive. Thank you.