danmunn / redmine_dmsf

Fork of svn repository for redmine_dmsf
GNU General Public License v2.0
413 stars 193 forks source link

Can't access a folder under watch, but works again when unwatching the folder #1469

Closed Raw1mage closed 10 months ago

Raw1mage commented 10 months ago

The folder is created by a first user, and tested by a second user. If the folder is under watch by the second user, the second user can't click the folder and gets a server response HTTP 500. If the folder is unwatched, it works again. image image

Providing the error log below: I, [2023-08-23T05:57:00.626485 #1] INFO -- : Started GET "/projects/ilrdfmis/dmsf?folder_id=2" for 192.168.10.254 at 2023-08-23 05:57:00 +0000 I, [2023-08-23T05:57:00.627645 #1] INFO -- : Processing by DmsfController#show as HTML I, [2023-08-23T05:57:00.627713 #1] INFO -- : Parameters: {"folder_id"=>"2", "id"=>"ilrdfmis"} I, [2023-08-23T05:57:00.881155 #1] INFO -- : Current user: yeatsluo (id=5) I, [2023-08-23T05:57:01.018865 #1] INFO -- : Rendered plugins/redminedmsf/app/views/dmsf/show.html.erb within layouts/base (Duration: 76.8ms | Allocations: 21342) I, [2023-08-23T05:57:01.018948 #1] INFO -- : Rendered layout layouts/base.html.erb (Duration: 76.9ms | Allocations: 21369) I, [2023-08-23T05:57:01.019177 #1] INFO -- : Completed 500 Internal Server Error in 391ms (ActiveRecord: 278.0ms | Allocations: 37207) F, [2023-08-23T05:57:01.021139 #1] FATAL -- : ActionView::Template::Error (wrong number of arguments (given 1, expected 0)): 10: 11:

<%= l(:"label#{watched_klass_name}_watchers") %> (<%= watched.watcher_users.size %>)

12: 13: <%= watchers_list(watched) %>

plugins/redmine_dmsf/app/models/dmsf_folder.rb:104:in visible?' app/helpers/watchers_helper.rb:55:inblock in watchers_list' app/helpers/watchers_helper.rb:51:in collect' app/helpers/watchers_helper.rb:51:inwatchers_list' app/views/watchers/_watchers.html.erb:13 plugins/redmine_dmsf/app/views/dmsf/_main.html.erb:105 plugins/redmine_dmsf/app/views/dmsf/_main.html.erb:98 plugins/redmine_dmsf/app/views/dmsf/show.html.erb:23 plugins/redmine_dmsf/app/controllers/dmsf_controller.rb:94:in block (2 levels) in show' plugins/redmine_dmsf/app/controllers/dmsf_controller.rb:90:inshow' lib/redmine/sudo_mode.rb:61:in sudo_mode' plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:55:incall'

picman commented 10 months ago

I think that I've fixed it. Would you be able to test the devel branch?

Raw1mage commented 10 months ago

Yes, it works. ★★★★★

picman commented 10 months ago

Great!