Resolving "SystemStackError Infinite Recursion" between RedmineUP and Additionals Plugins

Issue Summary

When running Redmine, performing certain actions (such as viewing /my/page or issue lists) causes a 500 Internal Server Error.

Checking your Rails application logs (log/production.log) reveals a fatal stack trace similar to this:

FATAL -- : SystemStackError (stack level too deep):
plugins/redmine_people/lib/redmine_people/patches/query_patch.rb:26:in `add_filter'
plugins/additionals/lib/additionals/patches/query_patch.rb:49:in `add_filter_with_additionals'
plugins/redmine_people/lib/redmine_people/patches/query_patch.rb:26:in `add_filter'
plugins/additionals/lib/additionals/patches/query_patch.rb:49:in `add_filter_with_additionals'
...

Root Cause

This error is caused by a method patching conflict between RedmineUP plugins (e.g., redmine_people, redmine_contacts) and the additionals plugin (by AlphaNodes).

1. Older versions of plugins patched Redmine core methods using Ruby's alias_method.

2. Newer versions of plugins patched the same core methods using Ruby's Module#prepend.

3. The Conflict: When one plugin uses alias_method and another uses prepend on the exact same method (like Query#add_filter), it triggers an infinite call loop, resulting in SystemStackError (stack level too deep).

Solutions & Recommended Configurations

To resolve this issue, both plugin suites must use the same patching mechanism. Your resolution path depends on your installed version of Redmine core.

Option A: Standard Setup (Redmine 7.x or Newer)

If you are running Redmine 7.0+, upgrade all plugins to their latest versions so that all codebases utilize prepend.

1. RedmineUP Plugins: Update all installed RedmineUP plugins to their latest releases.

2. Additionals / Additional Tags: Upgrade to version 4.6.0 or newer (or use the stable branch).

Option B: Legacy Setup (Redmine 6.x)

If you are running Redmine 6.0 or 6.1, you cannot run additionals 4.6.0+ (as version 4.6.0 dropped support for Redmine 6.x). Both suites must stick to the legacy alias_method approach.

1. Additionals / Additional Tags: Lock your installation to tag 4.5.0.

2. RedmineUP Plugins: Downgrade/maintain your RedmineUP plugins to versions that still rely on alias_method rather than prepend.

Summary Matrix

Redmine Version RedmineUP Patching Style additionals Plugin Version Result
Redmine 7.0+ prepend (Latest) 4.6.0 or newer Compatible
Redmine 6.x alias_method (Legacy) 4.5.0 Compatible
Any Version prepend 4.5.0 (alias_method) Crash (SystemStackError)
Any Version alias_method 4.6.0+ (prepend) Crash (SystemStackError)

Step-by-Step Fix Procedure

1. Verify Versions: Navigate to Administration ---> Information in your Redmine instance to check your current Redmine core version and installed plugin versions.

2. Align Plugins: Depending on your Redmine version, download and apply the matching versions from the matrix above.

3. Restart Application: Clear your Rails cache and restart your Application Server (Passenger, Puma, Unicorn, etc.):

touch tmp/restart.txt
Was this article helpful? Yes  No