redmine_knowledgebase icon indicating copy to clipboard operation
redmine_knowledgebase copied to clipboard

can't modify frozen ActiveSupport::HashWithIndifferentAccess

Open txinto opened this issue 9 years ago • 8 comments

Hello, using 3.2 and trying to create the first article, this error appears:

Started POST "/redmine/projects/est/knowledgebase/articles" for 10.0.2.2 at 201$
Processing by ArticlesController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"VZk6qx8pOopsSMZbEfkjOndzmqXg$
  Current user: admin (id=1)
Completed 500 Internal Server Error in 123ms (ActiveRecord: 116.9ms)

RuntimeError (can't modify frozen ActiveSupport::HashWithIndifferentAccess):
  plugins/redmine_knowledgebase/app/controllers/articles_controller.rb:55:in `c$
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
  plugins/redmine_dmsf/lib/redmine_dmsf/webdav/no_parse.rb:33:in `call'

This is the information of the current installation:

Environment: Redmine version 3.2.0.stable.1233 Ruby version 2.1.5-p273 (2014-11-13) [x86_64-linux-gnu] Rails version 4.2.5.1 Environment production Database adapter Mysql2 SCM: Subversion 1.8.10 Mercurial 3.1.2 Git 2.1.4 Filesystem
Redmine plugins: disable_activity 0.0.1 msproject_import 0.3.0 redmine_checklists 3.1.3 redmine_dmsf 1.5.6 redmine_ics_export 3.0.1.dev redmine_knowledgebase 3.1.0 redmine_logs 0.1.0 redmine_questions 0.0.7 redmine_startpage 0.1.0 redmine_tweaks 0.5.7 redmine_wiki_books 0.0.3 redmine_wiki_extensions 0.7.0 redmine_xls_export 0.2.1.t9 redmine_xlsx_format_issue_exporter 0.1.2 sidebar_hide 0.0.7 wiking 1.0.0b

Best regards and thank you for the plugin.

txinto avatar Mar 23 '16 18:03 txinto

I believe it is due to Rails 4.2. Similar error https://github.com/mbleigh/acts-as-taggable-on/issues/580 (pointing solution PR for that project)

kostyfisik avatar Mar 23 '16 18:03 kostyfisik

@txinto can you test this with v3.2.0?

alexbevi avatar Jun 23 '16 02:06 alexbevi

Define "this".
There are a lot of messages in that conversations and can't see the patch or configurartion change that it is supposed to be applied on my setup.

Or are you asking to test my system with the latest commit of the knowledgebased plugin?

txinto avatar Jun 23 '16 11:06 txinto

@txinto I have a new version of the knowledgebase out that support Redmine 3.2 which should address the original issue you described. This version doesn't support searching at the moment though so you may want to hold off.

alexbevi avatar Jun 24 '16 01:06 alexbevi

@txinto it also appears that the call stack includes redmine_dmsf, which could be causing this issue as well ...

alexbevi avatar Jun 24 '16 01:06 alexbevi

Thanks. I'll try it ASAP. Probably next week.

BR.

Tx El 24/06/2016 02:29, "Alex Bevilacqua" [email protected] escribió:

@txinto https://github.com/txinto it also appears that the call stack includes redmine_dmsf, which could be causing this issue as well ...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alexbevi/redmine_knowledgebase/issues/323#issuecomment-228233303, or mute the thread https://github.com/notifications/unsubscribe/AAKO_Kr-fZBoZb3R_Fc5PzJOBEKJJUzmks5qOzLegaJpZM4H3WKz .

txinto avatar Jun 24 '16 12:06 txinto

@alexbevi I just tested version 3.2.1 of the pluggin redmine_knowledgebase and I'm getting the same error message that txinto is getting, this error message is generated when I created the first article.

This is the error message I see on the log:

'Started POST "/redmine/projects/test/knowledgebase/articles" for 127.0.0.1 at 2016-10-26 17:07:29 -0500
Processing by ArticlesController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"+Tl1u9PBQpjf9eFi8fOjUSKcOn/sJrIbFazmC6LdqCIEl/2wotPrfucy0Vog/Ktv2L8ONNCy8IZwuLUv8IB0cg==", "category_id"=>"5", "article"=>{"title"=>"Test", "summary"=>"Test1a df asdf", "content"=>"<p>adsf adsf sadf dsaf</p>\r\n", "tag_list"=>"Test", "version_comments"=>"Initial"}, "commit"=>"Create", "project_id"=>"test"}
  Current user: root (id=1)
Completed 500 Internal Server Error in 42ms (ActiveRecord: 24.0ms)

RuntimeError (can't modify frozen ActiveSupport::HashWithIndifferentAccess):
  plugins/redmine_knowledgebase/app/controllers/articles_controller.rb:70:in `create'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

This is the installation I have:

Environment: Redmine version 3.3.1.stable Ruby version 2.1.9-p490 (2016-03-30) [i386-mingw32] Rails version 4.2.7.1 Environment production Database adapter Mysql2 SCM: Subversion 1.8.11 Git 2.7.4 Filesystem
Redmine plugins: redmine_ckeditor 1.1.4 redmine_knowledgebase 3.2.1 redmine_lightbox2 0.3.1 redmine_theme_changer 0.2.0

Josuefdz avatar Oct 27 '16 15:10 Josuefdz

Hello, I have the same issue. I just installed the knowledgebase plugin, and get this error when trying to create the first article.

Started POST "/projects/base-de-conhecimento/knowledgebase/articles" for 192.168.100.143 at 2018-03-05 11:35:06 +0000 Processing by ArticlesController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"TrWc522t2/DT///N3IhOayzGc5S8RUC5sSN2nfe2XkUFMrzfW5Cc7QLMf2t6IHnjOo0MtrWTcNX0gvparMO5SQ==", "category_id"=>"3", "article"=>{"title"=>"teste", "summary"=>"teste", "content"=>"teste", "tag_list"=>"teste", "version_comments"=>"teste"}, "commit"=>"Criar", "project_id"=>"base-de-conhecimento"} Current user: vnr (id=3) Completed 500 Internal Server Error in 30ms (ActiveRecord: 8.5ms)

RuntimeError (can't modify frozen ActiveSupport::HashWithIndifferentAccess): plugins/redmine_knowledgebase/app/controllers/articles_controller.rb:89:in create' lib/redmine/sudo_mode.rb:63:in sudo_mode'

My environment:

redmine 3.4.4 ruby 2.3.6p384 Rails 4.2.8 Redmine plugins: clipboard_image_paste easy_gantt easy_mindmup easy_wbs export_docx redmine_hourglass redmine_local_avatars redmine_projects_tree redmine_knowledgebase

Regards, Vitor

vitorrolo avatar Mar 05 '18 12:03 vitorrolo