danmunn / redmine_dmsf

Fork of svn repository for redmine_dmsf
GNU General Public License v2.0
417 stars 195 forks source link

adminstration-settings cannot open after dmsf installed #1506

Closed nightmeteora closed 4 months ago

nightmeteora commented 8 months ago

After install dmsf 3.1.3, the setting page in administrations cannot open. the redmine is based on docker bitnami/redmine

installation steps:

# get 
git clone https://github.com/danmunn/redmine_dmsf.git

# Inside docker container
cd /bitnami/redmine
chown -R redmine:root plugins/redmine_dmsf
bundle install
RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf

# then restart docker
docker-compose restart

after restart, settings page in administrators cannot open

log snippets of output docker-compose logs redmine

the log plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:40:inall_with_resources_dmsf' repeated for more than 10k times in the log.

^[[36mredmine_1  |^[[0m I, [2024-02-02T09:50:35.170086 #255]  INFO -- : [8906b5e4-3a11-4274-8f05-7042fc90c649] Processing by SettingsController#index as HTML
^[[36mredmine_1  |^[[0m I, [2024-02-02T09:50:35.177691 #255]  INFO -- : [8906b5e4-3a11-4274-8f05-7042fc90c649]   Current user: admin (id=1)
^[[36mredmine_1  |^[[0m I, [2024-02-02T09:50:35.207537 #255]  INFO -- : [8906b5e4-3a11-4274-8f05-7042fc90c649] Completed 500 Internal Server Error in 37ms (ActiveRecord: 2.1ms | Allocations: 12256)
^[[36mredmine_1  |^[[0m F, [2024-02-02T09:50:35.246744 #255] FATAL -- : [8906b5e4-3a11-4274-8f05-7042fc90c649]
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] SystemStackError (stack level too deep):
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649]
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:40:in `all_with_resources_dmsf'
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:40:in `all_with_resources_dmsf'
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:40:in `all_with_resources_dmsf'
...
...
...

^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:40:in `all_with_resources_dmsf'
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:40:in `all_with_resources_dmsf'
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] app/controllers/settings_controller.rb:37:in `edit'
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] app/controllers/settings_controller.rb:32:in `index'
^[[36mredmine_1  |^[[0m [8906b5e4-3a11-4274-8f05-7042fc90c649] lib/redmine/sudo_mode.rb:61:in `sudo_mode' 

Environment:

  Redmine version                5.1.1.stable
  Ruby version                   3.0.6-p216 (2023-03-30) [x86_64-linux]
  Rails version                  6.1.7.6
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::InlineAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Default
SCM:
  Git                            2.30.2
  Filesystem                     
Redmine plugins:
  redmine_contacts               4.3.8
  redmine_dmsf                   3.1.3
  redmine_ldap_sync              2.3.1
nightmeteora commented 8 months ago

thanks for looking into the issue.

it seemed a conflict to the installed plugin redmine_contacts. After redmine_contacts was removed, the setting page is back to OK.

it would be highly appreciated if you could resolve the issue.

picman commented 7 months ago

I cannot reproduce your issue. However, I have made a change in the code. Could you re-test it with the devel branch, please?

picman commented 7 months ago

Tested with Redmine CRM plugin (Light version) 4.4.0.

dskibarko commented 7 months ago

Seems same root cause problem after upgrade to 3.1.3 version. The next behavior observed:

  1. only the administrator rights are given access to DMS
  2. the DMS access rights settings in the project are missing (they were in version 3.0.12)
  3. in older projects, where there was no access rights management in the project settings, access for everyone was preserved
picman commented 7 months ago

What do you mean with DMS access right settings in the project?

dskibarko commented 7 months ago

What do you mean with DMS access right settings in the project?

Issue #1512 created,

mtolava commented 5 months ago

I Karel, I was reading all the issues with the same problems. Before I had this error, but now I change the redmine version of my environment:

  Redmine version                4.2.11.stable.22324
  Ruby version                   2.7.8-p225 (2023-03-30) [x86_64-linux]
  Rails version                  5.2.8.1
Redmine plugins:
  redmine_agile                  1.6.8
  redmine_budgets                1.0.5
  redmine_checklists             3.1.23
  redmine_dmsf                   3.0.5
  redmineup_tags                 2.0.13
  timesheet                      0.7.0

It is the same for a older version?

Completed 500 Internal Server Error in 20ms (ActiveRecord: 5.6ms)
SystemStackError (stack level too deep):
plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in `all_with_resources_dmsf'

Thanks

picman commented 5 months ago

The problem is related to RedmineUp's plugin and their versions. Try the devel branch.

mtolava commented 5 months ago

The problem is related to RedmineUp's plugin and their versions. Thry the devel branch.

Can I test the devel branch with a old tag? like 3.0.5?

picman commented 5 months ago

No, the fix is in the current devel branch.

mtolava commented 5 months ago

No, the fix is in the current devel branch.

Thanks!