Project

General

Profile

Actions

Defect #40921

closed

JSON API causes 500 Internal Server Error

Added by Egor Bolotov 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

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

Is duplicate of Redmine - Patch #40802: Support builder 3.3.0ClosedGo MAEDA

Actions
Actions #1

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'

Actions #2

Updated by Go MAEDA 5 months ago

  • Status changed from New to Closed
  • Resolution set to Invalid
Actions #3

Updated by Holger Just 5 months ago

Actions #4

Updated by Holger Just 5 months ago

  • Resolution changed from Invalid to Duplicate
Actions

Also available in: Atom PDF