Defect #40921
closedJSON API causes 500 Internal Server Error
0%
Description
I use redmine 5.0.7 with https://github.com/redmine/redmine/commit/d909b82d32fd3deb3b2a01e253da7aa264ffc89c this official patch. When i try to access rest api in json format, i get the error below.SystemStackError (stack level too deep):
lib/redmine/views/builders/structure.rb:49:in `method_missing'
.......
a lot of this string "lib/redmine/views/builders/structure.rb:69:in `method_missing'"
.......
lib/redmine/views/builders/structure.rb:69:in `method_missing'
app/views/timelog/index.api.rsb:3:in `block (3 levels) in smth'
app/views/timelog/index.api.rsb:2:in `each'
app/views/timelog/index.api.rsb:2:in `block (2 levels) in smth'
lib/redmine/views/builders/structure.rb:32:in `array'
app/views/timelog/index.api.rsb:1:in `block in smth'
lib/redmine/views/builders.rb:38:in `for'
app/views/timelog/index.api.rsb:1:in `smth'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
Without the patch, when i force to install old version of builder gem, rest api works.
Related issues
Updated by Pavel Rosický 5 months ago
the patch is valid for the latest development version (Redmine 6). Backporting it to older versions might need more changes.
note that, Redmine 5.0 is still supported and this issue has been fixed and released as Redmine 5.0.9. Is anything blocking an upgrade to the official version, or why are you manually patching it?
if you can't upgrade for some reason, either use a patch for the right Redmine version
https://github.com/redmine/redmine/blob/5.0-stable/lib/redmine/views/builders/structure.rb
or alternatively, lock the gem version
gem 'builder', '~> 3.2.4'
Updated by Holger Just 5 months ago
- Is duplicate of Patch #40802: Support builder 3.3.0 added
Updated by Holger Just 5 months ago
- Resolution changed from Invalid to Duplicate