Defect #35430
closedInternal error when viewing revisions diff
Added by salman mp over 3 years ago. Updated 8 months ago.
0%
Description
When I want to view revisions diff in the one project repository tab, in the first try it is OK, but after refresh or try another revisions diff it throw internal server error 500.
I found that is because of using any deface on 'layout/base'.
Updated by Holger Just over 3 years ago
- Status changed from New to Needs feedback
Please see Submissions.
When reporting a bug, we need details about your environment and a full stack trace. If you are using any plugins. please confirm that the issue is caused by Redmine core and is still observable after you have removed all plugins.
Updated by salman mp over 3 years ago
This is my "info":
Environment: Redmine version 4.1.1.stable Ruby version 2.5.7-p206 (2019-10-01) [x86_64-linux] Rails version 5.2.4.2 Environment production Database adapter PostgreSQL Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery sendmail SCM: Subversion 1.13.0 Mercurial 5.3.1 Git 2.25.1 Filesystem Redmine plugins: redmine_scm 0.6.0 my_plugin 0.0.1 (Using Deface to change layout/base)
and production log:
Processing by RepositoriesController#diff as HTML Parameters: {"utf8"=>"✓", "rev_to"=>"1a484b55d58e9c06ff497e0459bd9a4e5ec6c599", "type"=>"inline", "repository_id"=>"5", "rev"=>"334c0372bd11c4677a16bfd3f8d83106c0dfc5f4"} Current user: redmine (id=1) Rendering repositories/diff.html.erb within layouts/base Rendered repositories/diff.html.erb within layouts/base (14.0ms) Completed 500 Internal Server Error in 405ms (ActiveRecord: 21.1ms) ActionView::Template::Error (undefined method `encoding' for nil:NilClass):
Updated by Liane Hampe over 3 years ago
I have observed the same error but could figure out that the reason is located in gem deface.
As long as we use Rails 5.2 we need to use deface 1.6.2 because higher versions consider some changes in Rails 6. Although the deface people try to be backward compatible there seems to be an edge case in combination with the diff template.
Updated by salman mp over 3 years ago
Go MAEDA wrote:
Does the error occur without plugins?
No, even when using plugins without any deface on 'layout/base', there is no problem.
Updated by Mischa The Evil over 3 years ago
salman mp wrote:
Go MAEDA wrote:
Does the error occur without plugins?
No, even when using plugins without any deface on 'layout/base', there is no problem.
This does not exclude the 'redmine_scm' plugin from being the culprit of your problem. You should check if your problem persists when Redmine is running without any plugins.
Updated by salman mp over 3 years ago
Mischa The Evil wrote:
salman mp wrote:
Go MAEDA wrote:
Does the error occur without plugins?
No, even when using plugins without any deface on 'layout/base', there is no problem.
This does not exclude the 'redmine_scm' plugin from being the culprit of your problem. You should check if your problem persists when Redmine is running without any plugins.
If I understand what you mean, I have to admit, since I do not have the SVN code repository available, I can only test with this redmine_scm plugin. However, I only get an error if a plugin defaced 'layout/base' and Redmine is running in production mode.
Updated by Eugen Schmidt over 1 year ago
I have the same problem. What I did, but when viewing the difference, I get the error Internal Error
Updated by Holger Just 8 months ago
- Status changed from Needs feedback to Closed
- Resolution set to Cant reproduce
The original issue seemed to be caused by a plugin. As such, please contact the plugin author(s) for help.