プロジェクト

全般

プロフィール

Vote #81495

未完了

Internal error when viewing revisions diff

Admin Redmine さんが約4年前に追加. ほぼ4年前に更新.

ステータス:
Needs feedback
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
35430
author_id:
147409
assigned_to_id:
0
comments:
7
status_id:
10
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
162
ステータス-->[Needs feedback]

説明

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'.


journals

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.
--------------------------------------------------------------------------------
This is my "info":
<pre>
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)
</pre>

and production log:
<pre>
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):

</pre>
--------------------------------------------------------------------------------
Does the error occur without plugins?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Does the error occur without plugins?

No, even when using plugins without any deface on 'layout/base', there is no problem.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ4年前に更新

  • カテゴリSCM_3 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0