naidu / redmine-dmsf

Automatically exported from code.google.com/p/redmine-dmsf
0 stars 0 forks source link

DMSF plugin "undefined method `journal_class_name' for Object:Class)" error while trying to open Activity tab or user's My profile page #196

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install DMSF plugin on Chiliproject 2.6.0, 2.7.0 or 3.0.0
2. Try to enter Activity tab or user's My profile page

What is the expected output? What do you see instead?
The output should open page with activity information.
Instead I get an internal error with the following trace:
NoMethodError (undefined method `journal_class_name' for Object:Class):
  lib/redmine/activity/fetcher.rb:83:in `events'
  lib/redmine/activity/fetcher.rb:82:in `each'
  lib/redmine/activity/fetcher.rb:82:in `events'
  lib/redmine/activity/fetcher.rb:81:in `each'
  lib/redmine/activity/fetcher.rb:81:in `events'
  app/controllers/users_controller.rb:69:in `show'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
  /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering /usr/share/chiliproject/public/500.html (500 Internal Server Error)"

What version of the DMSF and Redmine are you using? On what browser and 
operating system?
DMSF: 1.2.2
Chiliproject: 2.6.0, 2.7.0, 3.0.0
OS: Ubuntu 10.04 LTS but with custome gem
Brwowser: Firefox 10.0.1

Please provide any additional information below.

Original issue reported on code.google.com by pafcio...@gmail.com on 13 Feb 2012 at 10:35

GoogleCodeExporter commented 9 years ago
I have posted information about this plugin on Chiliproject forums (see 
https://www.chiliproject.org/boards/1/topics/1211?r=1230#message-1230) and the 
response from developers was: "The DMSF plugin seems to still use the old and 
deprecated events, it won't work as is with current ChiliProject, sorry."

Original comment by pafcio...@gmail.com on 16 Feb 2012 at 7:12

GoogleCodeExporter commented 9 years ago
Comment lines as shown below. You will loose activity entries from DMSF but 
error will disappear. 
Please vote for #125.

/app/models/dmsf_file.rb
#  acts_as_event :title => Proc.new {|o| "#{o.title} - #{o.name}"},
#                :description => Proc.new {|o| o.description },
#                :url => Proc.new {|o| {:controller => "dmsf_files", :action => 
"show", :id => o, :download => ""}},
#                :datetime => Proc.new {|o| o.updated_at },
#                :author => Proc.new {|o| o.last_revision.user }

/app/models/dmsf_file_revision.rb
#  acts_as_event :title => Proc.new {|o| "#{l(:label_dmsf_updated)}: 
#{o.file.dmsf_path_str}"},
#                :url => Proc.new {|o| {:controller => 'dmsf_files', :action => 
'show', :id => o.file}},
#                :datetime => Proc.new {|o| o.updated_at },
#                :description => Proc.new {|o| o.comment },
#                :author => Proc.new {|o| o.user }
#                
#  acts_as_activity_provider :type => "dmsf_files",
#                            :timestamp => 
"#{DmsfFileRevision.table_name}.updated_at",
#                            :author_key => 
"#{DmsfFileRevision.table_name}.user_id",
#                            :permission => :view_dmsf_files,
#                            :find_options => {:select => 
"#{DmsfFileRevision.table_name}.*", 
#                                              :joins => 
#                                                "INNER JOIN 
#{DmsfFile.table_name} ON #{DmsfFileRevision.table_name}.dmsf_file_id = 
#{DmsfFile.table_name}.id " +
#                                                "INNER JOIN 
#{Project.table_name} ON #{DmsfFile.table_name}.project_id = 
#{Project.table_name}.id",
#                                              :conditions => 
["#{DmsfFile.table_name}.deleted = :false", {:false => false}]
#                                             }

/app/models/dmsf_folder.rb
#  acts_as_event :title => Proc.new {|o| o.title},
#                :description => Proc.new {|o| o.description },
#                :url => Proc.new {|o| {:controller => "dmsf", :action => 
"show", :id => o.project, :folder_id => o}},
#                :datetime => Proc.new {|o| o.updated_at },
#                :author => Proc.new {|o| o.user }

/init.rb
#  activity_provider :dmsf_files, :class_name => "DmsfFileRevision", :default 
=> true

Original comment by wojciech...@gmail.com on 24 Feb 2012 at 6:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks:-) I voted for the issue you had pointed.

Original comment by pafcio...@gmail.com on 28 Feb 2012 at 7:07