Project

General

Profile

500 error during the time entry update after upgrading to 4.1.1.

Added by Andrzej Karwowski over 3 years ago

Hi.

After upgrading from Redmine 3.4 to v 4.1.1 I have 500 error during the time entry update - see the log. The column 'author_id' is the new one added in the time_entries table.
Is it a configuation problem or other? How to deal with this?

Log:
Started GET "/time_entries/new" for ................. at 2020-10-16 11:22:40 +0200
Processing by TimelogController#new as HTML
Current user: .......... (id=5)
Completed 500 Internal Server Error in 18ms (ActiveRecord: 13.2ms)
ActiveModel::MissingAttributeError (can't write unknown attribute `author_id`):
app/models/time_entry.rb:98:in `initialize'
app/controllers/timelog_controller.rb:95:in `new'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'

Environment:
Redmine version 4.1.1.stable.20036
Ruby version 2.6.0-p0 (2018-12-25) [x86_64-linux]
Rails version 5.2.4.2
Environment production
Database adapter SQLServer
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.7.14
Git 1.8.3.1
Filesystem
Redmine plugins:
no plugin installed


Replies (4)

RE: 500 error during the time entry update after upgrading to 4.1.1. - Added by Adrián Pradilla Pórtoles over 3 years ago

Hello,

Did you make sure to execute the migrations?
Run from console rake db:migrate

Greetings,
Adrian

RE: 500 error during the time entry update after upgrading to 4.1.1. - Added by Rik FR over 3 years ago

Hello,

We are faceing the same problem. We are upgrading from 3.3.1 to 4.1.1 and all seems to work properly, the only exception is:

I, [2020-10-21T07:35:48.799182 #1]  INFO -- : Completed 500 Internal Server Error in 45ms (ActiveRecord: 14.0ms)
F, [2020-10-21T07:35:48.799535 #1] FATAL -- :
F, [2020-10-21T07:35:48.799554 #1] FATAL -- : ActiveModel::MissingAttributeError (can't write unknown attribute `author_id`):
F, [2020-10-21T07:35:48.799564 #1] FATAL -- :
F, [2020-10-21T07:35:48.799573 #1] FATAL -- : app/controllers/issues_controller.rb:580:in `block in save_issue_with_child_records'

And yes we executed the rake db:migrate moving a DB from 3.3.1 to 4.1.1 is required to do the upgrade

RE: 500 error during the time entry update after upgrading to 4.1.1. - Added by Rik FR over 3 years ago

We have just find our mistake. After doing the rake db:migrate we forgot to restart the application. Now everything seems to be working properly.

RE: 500 error during the time entry update after upgrading to 4.1.1. - Added by Andrzej Karwowski over 3 years ago

Yes, to run from console rake db:migrate and restart - that's the key clue.
Thanks for helping.

    (1-4/4)