Bug #461
closedNoMethodError after accepting approval workflow step
100%
Description
Redmine 4.2.2
When a user clicks to accept the workflow step the following error occurs:
Started POST "/dmsf_workflows/2/new_action" for 192.168.3.41 at 2021-08-22 13:38:04 +0000
Processing by DmsfWorkflowsController#new_action as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"2zQoX/Gn6an8JKx9O/hbD6SYuuL+g2PxM1RPiIs1Fk1RPVTEscAOcJBy6/J0isUp+tXuo4RXRnDwOkLClg9SRg==", "dmsf_workflow_step_assignment_id"=>"5", "dmsf_file_revision_id"=>"4", "step_action"=>"1", "note"=>"I.O.", "user_search"=>"", "commit"=>"OK", "id"=>"2"}
Current user: kerstin_neumann (id=11)
Rendering plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.text.erb within layouts/mailer
Rendered plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.text.erb within layouts/mailer (1.9ms)
Rendering plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.html.erb within layouts/mailer
Rendered plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.html.erb within layouts/mailer (0.9ms)
Rendering plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.text.erb within layouts/mailer
Rendered plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.text.erb within layouts/mailer (0.3ms)
Rendering plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.html.erb within layouts/mailer
Rendered plugins/redmine_dmsf/app/views/dmsf_mailer/workflow_notification.html.erb within layouts/mailer (0.3ms)
Completed 500 Internal Server Error in 197ms (ActiveRecord: 27.4ms)
NoMethodError (undefined method `h' for #<DmsfWorkflowsController:0x00007fe634476bd0>):
plugins/redmine_dmsf/app/controllers/dmsf_workflows_controller.rb:167:in `block in new_action'
plugins/redmine_dmsf/app/controllers/dmsf_workflows_controller.rb:167:in `collect'
plugins/redmine_dmsf/app/controllers/dmsf_workflows_controller.rb:167:in `new_action'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:56:in `call'
Updated by liaham over 3 years ago
- Related to Bug #462: HTTP Status 500 when accepting an approval workflow step for documents added
Updated by liaham over 3 years ago
- Related to Maintenance #465: Support Redmine DMSF 2.4.7 added
Updated by liaham over 3 years ago
- Related to deleted (Maintenance #465: Support Redmine DMSF 2.4.7)
Updated by liaham over 3 years ago
- Status changed from New to In Progress
- Start date deleted (
08/22/2021) - % Done changed from 0 to 30
The reason for the error is still unknown.
However, it is clear how to fix it: include ERB:Utils in the respecive classes or modules.
But before doing this hack, the project:xmera-omnia-plugin, where the reason must be somewhere in the code, should be investigated further. Since there are already tickets describing the movement of some logical parts in the plugin to another plugin, this should be done to better isolate code and debug the error. See #231, #232.
Updated by liaham over 3 years ago
Meanwhile we observed that the error occurs even if the suspected plugins are disabled. Hence, the reason for the error is somewhere else.
Therefore, the fix by include ERB:Utils is prefered.
Updated by liaham over 3 years ago
Found a discussion on GitHub and recognised that the change is removed again at least at some places in the codebase:
Updated by liaham over 3 years ago
Send a pull request since there the critical ERB::Util#h
is still in use in DmsfUploadHelper
.
Updated by liaham over 3 years ago
- Status changed from In Progress to Feedback
- % Done changed from 30 to 80
Updated by liaham over 3 years ago
- Status changed from Feedback to Closed
- % Done changed from 80 to 100