Project

General

Profile

Actions

Defect #5113

closed

ActionView::TemplateError (undefined local variable or method `issue')

Added by Michaelian Ennis about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-03-18
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Might have been introduced in r3594

Processing IssuesController#show (for 0.0.0.0 at 2010-03-17 19:10:05) [GET]
Parameters: {"action"=>"show", "id"=>"139", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml

ActionView::TemplateError (undefined local variable or method `issue' for #<ActionView::Base:0x107304208>) on line #14 of app/views/issues/_history.rhtml:
11: <li><%= show_detail(detail) ></li>
12: <
end >
13: </ul>
14: <
= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? >
15: </div>
16: <
= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) >
17: <
end %>

app/views/issues/_history.rhtml:14:in `_run_rhtml_app47views47issues47_history46rhtml_locals_history_journals_object'
app/views/issues/_history.rhtml:2:in `each'
app/views/issues/_history.rhtml:2:in `_run_rhtml_app47views47issues47_history46rhtml_locals_history_journals_object'
vendor/plugins/advanced_roadmap/app/views/issues/show.rhtml:94:in `_run_rhtml_vendor47plugins47advanced_roadmap47app47views47issues47show46rhtml'
app/controllers/issues_controller.rb:120:in `show'
app/controllers/issues_controller.rb:119:in `show'
passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
passenger (2.2.11) lib/phusion_passenger/utils.rb:184:in `safe_fork'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:163:in `start'
passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
Actions #1

Updated by Eric Davis about 14 years ago

  • Subject changed from Changes to issues complete but yield 500 to ActionView::TemplateError (undefined local variable or method `issue')

(cleaned up the title so it can be searched for)

Actions #2

Updated by Jean-Philippe Lang about 14 years ago

Can not be reproduced.

Your /app/views/issues/show.rhtml was not updated or you're using a plugin that overrides this view.
Make sure that you properly restarted the app too.

Actions #3

Updated by Mischa The Evil about 14 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

This is caused by the Advanced Roadmap plugin to be precise. It indeed overrides that specific view.
Please report it to the maintainer of the plugin.

Greetings.

Actions #4

Updated by Holger Just about 14 years ago

  • Status changed from Closed to Reopened

The issue is not closed indeed. The bug is still present. As the stack trace clearly states, it is the original view (app/views/issues/_history.rhtml:14) which throws the exception.

There is just a @ missing:

Index: app/views/issues/_history.rhtml
===================================================================
--- app/views/issues/_history.rhtml    (revision 3612)
+++ app/views/issues/_history.rhtml    (working copy)
@@ -11,7 +11,7 @@
        <li><%= show_detail(detail) %></li>
     <% end %>
     </ul>
-    <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
+    <%= render_notes(@issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
   </div>
   <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
 <% end %>

The bug was indeed introduced in r3594. It is only triggered is you perform e.g. a bulk update and enter no journal notes.

Actions #5

Updated by Holger Just about 14 years ago

Never mind, I overwrote the show.rhtml template...

Actions #6

Updated by Felix Schäfer about 14 years ago

  • Status changed from Reopened to Closed
Actions #7

Updated by Wael Nasreddine about 14 years ago

There's a patch for this issue upstream and on the bug #5346

Actions

Also available in: Atom PDF