Chart Plugin Error

Added by richard urrutia almost 8 years ago

I installed charts Plugin and OpenFlash but I have an error running Charts (Internal error).
This is the error that I found on the application log.
I’m running The last Bitnami version on Windows 2008.
Thanks

ActionView::TemplateError (undefined method `open_flash_chart_object_and_div_name’ for #) on line #57 of charts/index.rhtml:
54: <% end >
55:
56: = @show_left_column ? “68%” : “100%” >">
57: <= show_graph >
58:
59: < if @show_pages %>
60:

vendor/plugins/redmine_charts/app/helpers/charts_helper.rb:26:in `show_graph’ vendor/plugins/redmine_charts/app/views/charts/index.rhtml:57:in `_run_erb_47vendor47plugins47redmine_charts47app47views47charts47index46rhtml’ vendor/rails/actionpack/lib/action_view/base.rb:342:in `send’ vendor/rails/actionpack/lib/action_view/base.rb:342:in `execute’ vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `send’ vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `render’ vendor/rails/actionpack/lib/action_view/template.rb:35:in `render’ vendor/rails/actionpack/lib/action_view/template.rb:22:in `render_template’ vendor/rails/actionpack/lib/action_view/base.rb:248:in `render_file’ vendor/rails/actionpack/lib/action_controller/base.rb:1112:in `render_for_file’ vendor/rails/actionpack/lib/action_controller/base.rb:872:in `render_with_no_layout’ vendor/rails/actionpack/lib/action_controller/layout.rb:251:in `render_without_benchmark’ vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render’ vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:8:in `realtime’ vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render’ vendor/plugins/redmine_charts/app/controllers/charts_controller.rb:73:in `index’ vendor/rails/actionpack/lib/action_controller/base.rb:1166:in `send’ vendor/rails/actionpack/lib/action_controller/base.rb:1166:in `perform_action_without_filters’ vendor/rails/actionpack/lib/action_controller/filters.rb:579:in `call_filters’ vendor/rails/actionpack/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark’ vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure’ vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’ vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in `perform_action_without_caching’ vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’ vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache’ vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache’ vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’ vendor/rails/actionpack/lib/action_controller/base.rb:529:in `send’ vendor/rails/actionpack/lib/action_controller/base.rb:529:in `process_without_filters’ vendor/rails/actionpack/lib/action_controller/filters.rb:568:in `process_without_session_management_support’ vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in `process’ vendor/rails/actionpack/lib/action_controller/base.rb:389:in `process’ vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in `handle_request’ vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in `dispatch’ vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `synchronize’ vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `dispatch’ vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi’ vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in `dispatch’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in `process’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `synchronize’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `process’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run’ C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281 C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19:in `load’ C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19
Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/500.html (500 Internal Server Error)

Replies (2)

RE: Chart Plugin Error - Added by Marcin Nikt almost 8 years ago

Hi

I had the same error. I think it is connected to version of open flash. But I temporary resolved it. You should modify -> ... vendor\plugins\redmine_chart\app\helpers\chart_helper.rb like:

... 

def show_graph
    url_for_data = url_for(controller.params.merge(:action => :data)).gsub('&amp;', '&')
    relative_url_path = ActionController::Base.respond_to?(:relative_url_root) ? ActionController::Base.relative_url_root : ActionController::AbstractRequest.relative_url_root
#    html, div_name = controller.open_flash_chart_object_and_div_name('100%', '400', url_for_data, true, "#{relative_url_path}/")
#    html, div_name = open_flash_chart_object_and_div_name('100%', '400', url_for_data, true, "#{relative_url_path}/")
    controller.open_flash_chart_object('100%', '400', url_for_data, true, "#{relative_url_path}/")

#    html << '<script type="text/javascript">' << "\n" 
#    html << "var charts_to_image_title = '#{h(controller.title)}';\n" 
#    html << "var charts_to_image_id = '#{div_name}';\n" 
#    html << '</script>'

#    html
  end

...

- you must comment (#) some lines as above.

Next - you may implement http://www.redmine.org/boards/3/topics/5863#message-8844

Restart server and it should works.

RE: Chart Plugin Error - Added by Donnie Darko over 7 years ago

I'll try your solution, i'm currently having the same problem with charts. Without them i cannot continue my essay writer. Thanks for sharing.

(1-2/2)