danmunn / redmine_dmsf

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

redmine dmsf upload does not work #583

Closed Dmi3U closed 8 years ago

Dmi3U commented 8 years ago

Hi, new here... I have a problem with DMSF. I can add files, but when click commit I am getting redmine 500 error. Help...

picman commented 8 years ago

Look into the log file and post related errors from it.

Dmi3U commented 8 years ago

here is my log: Started POST "/projects/testing123/dmsf/upload/commit" for 10.101.9.36 at 2016-10-11 10:59:37 -0400 Processing by DmsfUploadController#commit_files as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"8owKnRM7VLSqDbAY16e2tc3DOFo4z3eJz/SOLE1nF5mhsoNkpuwlQCcps2XvIjTFNqph5r4/2kx2J/SOphUNEA==", "commited_files"=>{"0"=>{"disk_filename"=>"161011105921_ecad_in.log.5", "title"=>"ecad in.log", "name"=>"ecad_in.log.5", "description"=>"", "version"=>"1", "custom_version_major"=>"2", "custom_version_minor"=>"1", "comment"=>""}, "1"=>{"disk_filename"=>"161011105921_ecad_in.log.4", "title"=>"ecad in.log", "name"=>"ecad_in.log.4", "description"=>"", "version"=>"1", "custom_version_major"=>"2", "custom_version_minor"=>"1", "comment"=>""}, "2"=>{"disk_filename"=>"161011105921_ecad_in.log.3", "title"=>"ecad in.log", "name"=>"ecad_in.log.3", "description"=>"", "version"=>"1", "custom_version_major"=>"2", "custom_version_minor"=>"1", "comment"=>""}, "3"=>{"disk_filename"=>"161011105921_ecad_in.log.2", "title"=>"ecad in.log", "name"=>"ecad_in.log.2", "description"=>"", "version"=>"1", "custom_version_major"=>"2", "custom_version_minor"=>"1", "comment"=>""}, "4"=>{"disk_filename"=>"161011105922_ecad_in.log.1", "title"=>"ecad in.log", "name"=>"ecad_in.log.1", "description"=>"", "version"=>"1", "custom_version_major"=>"2", "custom_version_minor"=>"1", "comment"=>""}}, "commit"=>"Commit", "id"=>"testing123"} Current user: user-name (id=5) Completed 500 Internal Server Error in 75ms (ActiveRecord: 8.9ms)

picman commented 8 years ago

Hm, that's strange. What does say the web server error log?

Dmi3U commented 8 years ago

Here is a redmine log file (a little more info there)

Processing by DmsfUploadController#commit_files as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"ltMVsW5uMd0LpJlBhArGtSTgIANpXmEjtotv8hEtKzNtz2B7kC5zAqDRWqh4Fzwy/fEHJjMsCBfV9sW+AYNzJA==", "commited_files"=>{"0"=>{"disk_filename"=>"161027134943_396B720Ad01.pdf", "title"=>"396B720Ad01", "name"=>"396B720Ad01.pdf", "description"=>"testing", "version"=>"1", "custom_version_major"=>"2", "custom_version_minor"=>"1", "comment"=>""}}, "commit"=>"Commit", "id"=>"testing123"} Current user: ushamda1 (id=5) Completed 500 Internal Server Error in 38ms (ActiveRecord: 9.6ms)

NoMethodError (undefined method digest=' for #<DmsfFileRevision:0x007ff7291ac458> Did you mean? Digest): plugins/redmine_dmsf/app/controllers/dmsf_upload_controller.rb:192:inblock in commit_files_internal' plugins/redmine_dmsf/app/controllers/dmsf_upload_controller.rb:140:in each_value' plugins/redmine_dmsf/app/controllers/dmsf_upload_controller.rb:140:incommit_files_internal' plugins/redmine_dmsf/app/controllers/dmsf_upload_controller.rb:116:in commit_files' lib/redmine/sudo_mode.rb:63:insudo_mode'

Dmi3U commented 8 years ago

We have redmine 3.3.0 and were trying to install dmsf 1.5.8. To fix the error reported above we have uninstalled dmsf 1.5.8 and installed dmsf 1.5.6 now it works.

picman commented 8 years ago

Have you migrated the database after the installation?

bundle exec rake redmine:plugins:migrate RAILS_ENV=production

dmsf_file__revisions table must contain a column digest after the migration to 1.5.8.