danmunn / redmine_dmsf

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

Problem recovering dmsf files after redmine and plugin update #1451

Closed dsalgueiror closed 1 year ago

dsalgueiror commented 1 year ago

I recently upgraded Redmine version 2.5.3.stable to 5.0.4.stable

When updating the DMSF plugin, I see that it does not recover the files, obtaining a 404, I confirm that the files are in the same path, since it has not changed.

Environment:

  Redmine version                2.5.3.stable
  Ruby version                   1.9.3-p551 (2014-11-13) [x86_64-linux]
  Rails version                  3.2.19
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.7.4
  Filesystem                     
Redmine plugins:
  redmine_dmsf                   1.4.9 stable

Log:

Completed 200 OK in 335.7ms (Views: 0.6ms | ActiveRecord: 64.3ms)
Started GET "/dmsf/files/7611/view" for 192.158.1.99 at 2023-05-04 13:39:23 +0200
Processing by DmsfFilesController#view as HTML
  Parameters: {"id"=>"7611"}
  Current user: user1234 (id=184)
2023-05-04 13:39:23 user1234@192.158.1.99: downloaded dmsf://test/7611/9841
Sent file /app/www/apps/redmine/files/dmsf/test/document_test.doc (0.1ms)
Completed 200 OK in 21.8ms (ActiveRecord: 11.3ms)

Environment:

 Redmine version                5.0.4.stable
  Ruby version                   2.6.0-p0 (2018-12-25) [x86_64-linux]
  Rails version                  6.1.7
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Subversion                     1.6.11
  Filesystem                     
Redmine plugins:
  redmine_dmsf                   3.0.12

Log:

I, [2023-05-04T13:38:46.022361 #15785]  INFO -- : [707d4da2-7e30-460c-8685-49f3a2192215] Completed 200 OK in 1992ms (Views: 120.1ms | ActiveRecord: 1834.5ms | Allocations: 36085)
I, [2023-05-04T13:38:49.951882 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225] Started GET "/dmsf/files/7611/view" for 192.158.1.99 at 2023-05-04 13:38:49 +0200
I, [2023-05-04T13:38:49.953943 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225] Processing by DmsfFilesController#view as HTML
I, [2023-05-04T13:38:49.954119 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225]   Parameters: {"id"=>"7611"}
I, [2023-05-04T13:38:49.969099 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225]   Current user: user1234 (id=184)
I, [2023-05-04T13:38:50.039063 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225] Sent file /app/www/apps/redmine/files/dmsf/2022/06/document_test.doc (0.5ms)
E, [2023-05-04T13:38:50.039307 #15785] ERROR -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225] Cannot read file /app/www/apps/redmine/files/dmsf/2022/06/document_test.doc
I, [2023-05-04T13:38:50.041829 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225]   Rendered common/error.html.erb within layouts/base (Duration: 0.4ms | Allocations: 32)
I, [2023-05-04T13:38:50.133203 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225]   Rendered layout layouts/base.html.erb (Duration: 91.9ms | Allocations: 10359)
I, [2023-05-04T13:38:50.151620 #15785]  INFO -- : [5f6983fd-296b-4276-9ea9-ab93cd3c6225] Completed 404 Not Found in 197ms (Views: 64.3ms | ActiveRecord: 74.4ms | Allocations: 18194)

In the path /app/www/apps/redmine/files/dmsf/, which is the one configured in the plugin, a new 2022 folder has been generated but it is empty, however this is incorrect because the files are not there but rather in a folder with the name of the project.

picman commented 1 year ago

See #1130

dsalgueiror commented 1 year ago

The script from #767 moved all files and they are accessible now.

I'll check the migration logs again.

Thank you