Admininistration>Information page Internal error

Added by Greg G 6 months ago

Hi, Redmine newbie but trying to learn and help update/move for someone. Was able to migrate from old Centos/Redmine 3 to new Ubuntu/Redmine 5 with Agile Pro plugin seemingly fine. Everything is working well except for the Administration>Info page that gives an Internal error. Prodcution.log below, any help or guidance anyone could give very much appreciated. Thanks!

From production log:

I, [2022-04-07T15:42:42.711479 #7630]  INFO -- : [2b0691eb-cf27-4eca-ab16-83f23b08e490] Started GET "/redmine/admin/info" for 10.10.165.12 at 2022-04-07 15:42:42 -0700
I, [2022-04-07T15:42:42.712873 #7630]  INFO -- : [2b0691eb-cf27-4eca-ab16-83f23b08e490] Processing by AdminController#info as HTML
I, [2022-04-07T15:42:42.718949 #7630]  INFO -- : [2b0691eb-cf27-4eca-ab16-83f23b08e490]   Current user: GregG (id=12)
I, [2022-04-07T15:42:42.729654 #7630]  INFO -- : [2b0691eb-cf27-4eca-ab16-83f23b08e490]   Rendered admin/info.html.erb within layouts/admin (Duration: 1.5ms | Allocations: 867)
I, [2022-04-07T15:42:42.729710 #7630]  INFO -- : [2b0691eb-cf27-4eca-ab16-83f23b08e490]   Rendered layout layouts/admin.html.erb (Duration: 1.6ms | Allocations: 895)
I, [2022-04-07T15:42:42.729845 #7630]  INFO -- : [2b0691eb-cf27-4eca-ab16-83f23b08e490] Completed 500 Internal Server Error in 17ms (ActiveRecord: 2.7ms | Allocations: 16882)
F, [2022-04-07T15:42:42.730465 #7630] FATAL -- : [2b0691eb-cf27-4eca-ab16-83f23b08e490]
[2b0691eb-cf27-4eca-ab16-83f23b08e490] ActionView::Template::Error (undefined method `javascripts' for nil:NilClass):
[2b0691eb-cf27-4eca-ab16-83f23b08e490]     12: </table>
[2b0691eb-cf27-4eca-ab16-83f23b08e490]     13: <br />
[2b0691eb-cf27-4eca-ab16-83f23b08e490]     14: <div class="box autoscroll">
[2b0691eb-cf27-4eca-ab16-83f23b08e490]     15: <pre><%= Redmine::Info.environment %></pre>
[2b0691eb-cf27-4eca-ab16-83f23b08e490]     16: </div>
[2b0691eb-cf27-4eca-ab16-83f23b08e490]     17:
[2b0691eb-cf27-4eca-ab16-83f23b08e490]     18: <% html_title(l(:label_information_plural)) -%>
[2b0691eb-cf27-4eca-ab16-83f23b08e490]
[2b0691eb-cf27-4eca-ab16-83f23b08e490] lib/redmine/info.rb:25:in `environment'
[2b0691eb-cf27-4eca-ab16-83f23b08e490] app/views/admin/info.html.erb:15
[2b0691eb-cf27-4eca-ab16-83f23b08e490] lib/redmine/sudo_mode.rb:61:in `sudo_mode'

Running "RAILS_ENV=production script/about" I get command not found (is this an issue?) but here are the running versions:

Redmine 5.0.0
ruby 2.7.5p203
Rails 6.1.4.7
Gem 3.1.6

Replies (4)

RE: Admininistration>Information page Internal error - Added by Mischa The Evil 6 months ago

Hi,

I am the author of the code that causes your issue. I see effectively only one edge-case where this issue can occur and that is when you upgrade an existing Redmine instance that uses a custom theme without actually migrating the custom theme to the new instance also.
Can you confirm if this is the case in your situation?

If the above is indeed your case and you don't want to use the custom theme any longer, then the issue can be solved with the following steps:
  • Navigate to Administration -> Settings -> Display [tab];
  • Leave all settings as is (observe that the 'Theme' setting has the 'Default' value selected);
  • Click Save;
  • Navigate to Administration -> Information;
  • Validate that the page is rendered properly again.
If the above is indeed your case and you do want to restore the custom theme, you need to:
  • Look-up which theme was used in the old instance by checking its theme directory (/public/themes);
  • Check with the theme vendor if there is an updated version of the theme available for your new Redmine version;
  • Copy either the old custom theme directory (i.e. /public/themes/custom_theme_name) or the new updated custom theme directory to the theme directory of the new Redmine instance;
  • Restart Redmine;
  • Observe that the custom theme is picked-up automatically when you now navigate to any page in the new Redmine instance;
  • Navigate to Administration -> Settings -> Display [tab];
  • Validate that the 'Theme' setting has the correct custom theme value selected;
  • Navigate to Administration -> Information;
  • Validate that the page is rendered properly again.

If the above is not your case, please let me know.

P.S. script/about (and all other scripts) moved to bin/ several years ago.

RE: Admininistration>Information page Internal error - Added by Greg G 6 months ago

Thanks, that works! Our theme actually was set to Default but when changing to Classic the Info page shows without error. Thanks again and really appreciate your help and info.

RE: Admininistration>Information page Internal error - Added by Greg G 6 months ago

To add, just for info, you were spot on -- we were formerly running Circle theme in Redmine 3.X which I did not realize was a custom theme before.

Thanks again!

RE: Admininistration>Information page Internal error - Added by Mischa The Evil 6 months ago

Thanks for the feedback. I've reported this issue as #36932 with a proposed fix.

FWIW:

Greg G wrote:

[...] Our theme actually was set to Default but when changing to Classic [...]

[...] we were formerly running Circle theme in Redmine 3.X [...]

In fact your theme setting was probably still set to the Circle theme before you've changed it to Classic. However, since that theme wasn't present while loading Administration -> Settings the values drop-down of the 'Theme' setting omits the missing theme and falls-back on the default value (which is 'Default', internally represented with a nil value).

(1-4/4)