Project

General

Profile

why is plug-in "widget" not working?

Added by sean chan about 14 years ago

由 sean chan 在 44 分钟 之前添加

I download a plug-in named "widget" from the plugin-list "http://www.redmine.org/wiki/redmine/Plugin_List#My-Widgets-plugin"
1:
I placed it in the directory of \vendor\plugins,and renamed it as 'redmine_my_widgets'
2:
I add the page name to the "view\my\block\my_controller.rb" file ,'custom_queries'=> :label_***,.....
3:
I restart redmine,and I can see the plugin in "admin\plugins"
I can see the function I added in the block,but when I click the "add" button , it becomes an error

one of these functions I was trying to add to the "my/page_layout.rhtml" is "project_issues_cloud",and the error is like
"undefined method 'roles' for #<Member:...
Extracted source(around line #2)
1:<%
2: projects = User.current.memberships.collect{|m| m.project if m.roles.each{|role| role.allowed_to?(:view_issues)}}
.......
"

I checked the model "member",and I found out that "member belongs to role"!!!
why is that happening?
has the data structure of RedMine been changed? or just because I'm not using this plug-in in the right way?
thanks for help.......:)


Replies (7)

RE: why is plug-in "widget" not working? - Added by Terence Mill over 13 years ago

on redmine 1.01 i get following error:


ActionView::TemplateError (No plugin called 'redmine_my_widgets' - please use the full name of a loaded plugin.) on line #38 of vendor/plugins/redmine-my-widgets-plugin/app/views/my/blocks/_assigned_issues_cloud.html.erb:
35: <% end %>
36: 
37: <% content_for :header_tags do %>
38:     <%= stylesheet_link_tag 'my_widgets', :plugin => 'redmine_my_widgets' %>
39: <% end %> 

    vendor/plugins/redmine-my-widgets-plugin/app/views/my/blocks/_assigned_issues_cloud.html.erb:38
    app/helpers/application_helper.rb:816:in `content_for'
    vendor/plugins/redmine-my-widgets-plugin/app/views/my/blocks/_assigned_issues_cloud.html.erb:37
    app/views/my/page.rhtml:11:in `_run_rhtml_app47views47my47page46rhtml'
    app/views/my/page.rhtml:8:in `each'
    app/views/my/page.rhtml:8:in `_run_rhtml_app47views47my47page46rhtml'
    passenger (2.2.14) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    passenger (2.2.14) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
    passenger (2.2.14) lib/phusion_passenger/utils.rb:252:in `safe_fork'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:163:in `start'
    passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

RE: why is plug-in "widget" not working? - Added by Eric Davis over 13 years ago

You installed it to the wrong directory, it should be vendor/plugins/redmine_my_widgets.

    vendor/plugins/redmine-my-widgets-plugin/app/views/my/blocks/_assigned_issues_cloud.html.erb:38

Eric Davis

RE: why is plug-in "widget" not working? - Added by pasquale [:dedalus] almost 13 years ago

Terence Mill wrote:

on redmine 1.01 i get following error:

[...]

Is redmine 1.0.2 compatible with breadbeatty redmine-my-widgets 0.1.0?

RE: why is plug-in "widget" not working? - Added by Terence Mill almost 13 years ago

I have still no idea what the plugin does. Some screeners would be helpful.
Tx

RE: why is plug-in "widget" not working? - Added by pasquale [:dedalus] almost 13 years ago

Terence Mill wrote:

I have still no idea what the plugin does. Some screeners would be helpful.
Tx

Sorry Terence I have make some mistake before: reinstalling the plugin now all work fine.

Thanks for help

RE: why is plug-in "widget" not working? - Added by Terence Mill almost 13 years ago

Can u provide some screenhsots here .. tx!

RE: why is plug-in "widget" not working? - Added by pasquale [:dedalus] almost 13 years ago

Terence Mill wrote:

Can u provide some screenhsots here .. tx!

ok: adding _messages_posted_in_the_last_week_on_assigned_projects.html as widgest I have attached message. Removing from plugin all work fine

error.txt (29.3 KB) error.txt
    (1-7/7)