alphanodes / additionals

Redmine plugin for easy customization of settings, text and content display by using personal or role-based dashboards (drag&drop), providing wiki macros and act as library for other plugins.
https://www.redmine.org/plugins/additionals
GNU General Public License v2.0
131 stars 43 forks source link

`enable_smileys': NoMethodError (undefined method `map' for nil:NilClass #154

Closed sylvaindoco closed 1 year ago

sylvaindoco commented 1 year ago

Running Redmine 5.0.4 on Docker Standalone 20.10.22:

RUBY_VERSION | 3.1.3

The container is running but given the following logs as soon as the redmine https address is called:

I, [2022-12-21T13:44:40.312858 #1] INFO -- : Started GET "/" for 142.189.209.175 at 2022-12-21 13:44:40 +0000 I, [2022-12-21T13:44:40.314829 #1] INFO -- : Processing by WelcomeController#index as HTML I, [2022-12-21T13:44:40.376723 #1] INFO -- : Current user: anonymous I, [2022-12-21T13:44:40.378462 #1] INFO -- : Redirected to https://xxxx.yyyy.com/login?back_url=https%3A%2F%2Fxxxx.yyyy.com%2F I, [2022-12-21T13:44:40.378523 #1] INFO -- : Filter chain halted as :check_if_login_required rendered or redirected I, [2022-12-21T13:44:40.378640 #1] INFO -- : Completed 302 Found in 64ms (ActiveRecord: 9.2ms | Allocations: 36431) I, [2022-12-21T13:44:40.411475 #1] INFO -- : Started GET "/login?back_url=https%3A%2F%2Fxxxx.yyyy.com%2F" for 142.189.209.175 at 2022-12-21 13:44:40 +0000 I, [2022-12-21T13:44:40.412329 #1] INFO -- : Processing by AccountController#login as HTML I, [2022-12-21T13:44:40.412372 #1] INFO -- : Parameters: {"back_url"=>"https://xxxx.yyyy.com/"} I, [2022-12-21T13:44:40.414628 #1] INFO -- : Current user: anonymous I, [2022-12-21T13:44:40.420319 #1] INFO -- : Completed 500 Internal Server Error in 8ms (ActiveRecord: 1.8ms | Allocations: 4054) F, [2022-12-21T13:44:40.422395 #1] FATAL -- :
NoMethodError (undefined method `map' for nil:NilClass class_loader = ClassLoader::Restricted.new(permitted_classes.map(&:to_s), ^^^^):

app/models/setting.rb:111:in value' app/models/setting.rb:125:in[]' plugins/additionals/lib/additionals/patches/application_controller_patch.rb:16:in enable_smileys' lib/redmine/sudo_mode.rb:61:insudo_mode'

alexandermeindl commented 1 year ago

Hi @sylvaindoco,

do you use other plugins? Did you try it without other plugins? Maybe there is a compatibility issue with other plugins. Which additionals version do you use?

alexandermeindl commented 1 year ago

Hi @sylvaindoco, I did some change in my last commit, which should solve incompatibility problems, if smiley support is inactive in additionals.

This fixes not your problem, if you try to use smiley support with additionals.

sylvaindoco commented 1 year ago

Hi @alexandermeindl,

addtionals 3.0.7

I'm using 2 other plugins:

root@c377b08f80b9:/usr/src/redmine/plugins# ls README additionals redmine_wysiwyg_editor view_customize

Thanks

alexandermeindl commented 1 year ago

Hi @sylvaindoco, thanks for your feedback. additionals 3.0.7 should have no problems with Redmine 5.0.4 and ruby 3.1.3. _redmine_wysiwygeditor should not be a problem, too. I do not use view_customize, maybe you check it without this plugin.

sylvaindoco commented 1 year ago

Hi @alexandermeindl,

I didn't find an explanation of the issue. I have backuped the redmine MySQL database from a Docker container, tar the files directory. Reinstall redmine 5.0.4 on ubuntu 22.04 (without docker) with all initial plugin's (additionals redmine_wysiwyg_editor view_customize). Add emoji under public/images. Restoring the database on MariaDB. Now it's working perfectly.

Thank you for you previous reply.