alexbevi / redmine_knowledgebase

A knowledgebase plugin for Redmine
453 stars 197 forks source link

Compatibility Redmine v5.0 #401

Closed stefanoglv closed 1 month ago

stefanoglv commented 2 years ago

i think should be not a big work, but i'm not a ruby programmer... thanks

srinisubramanian commented 1 year ago

Any possibility that this can be done? Or hints/workarounds to get it to work

susumuf commented 1 year ago

Great work, @yzzy !!!

I've verified this PR working good with redmine:5.0.5-bookworm. Unless this PR gets merged, all of you should use yzzy's one. due to Zeitwerk autoloader. hope this gonna be handled soon as you can, @alexbevi

steps to install

$ git clone https://github.com/yzzy/redmine_knowledgebase.git      plugins/redmine_knowledgebase
$ chown -R redmine:redmine
$ bundle install

$ rake redmine:plugins:migrate NAME=redmine_knowledgebase
or
  REDMINE_PLUGINS_MIGRATE: true @Dockerfile
susumuf commented 1 year ago

Oooups, Filter by Tag makes Internal error....

redmine   | I, [2023-07-27T13:22:10.148941 #1]  INFO -- : Started GET "/projects/sandbox/knowledgebase/categories?author_id=&tag=rails" for 172.18.0.1 at 2023-07-27 13:22:10 +0900
redmine   | I, [2023-07-27T13:22:10.149806 #1]  INFO -- : Processing by CategoriesController#index as HTML
redmine   | I, [2023-07-27T13:22:10.149855 #1]  INFO -- :   Parameters: {"author_id"=>"", "tag"=>"rails", "project_id"=>"sandbox"}
redmine   | I, [2023-07-27T13:22:10.153151 #1]  INFO -- :   Current user: susumuf (id=7)
redmine   | I, [2023-07-27T13:22:10.158529 #1]  INFO -- : Completed 500 Internal Server Error in 9ms (ActiveRecord: 2.1ms | Allocations: 4165)
redmine   | F, [2023-07-27T13:22:10.158976 #1] FATAL -- :
redmine   | ActiveRecord::StatementInvalid (PG::AmbiguousColumn: ERROR:  column reference "id" is ambiguous
redmine   | LINE 1: ...s ON kb_articles.id = taggings.taggable_id WHERE ("id" = 2 A...
redmine   |                                                              ^
redmine   | ):
redmine   |
redmine   | plugins/redmine_knowledgebase/app/controllers/categories_controller.rb:133:in `sort'
redmine   | plugins/redmine_knowledgebase/app/controllers/categories_controller.rb:133:in `prepare'
redmine   | plugins/redmine_knowledgebase/app/controllers/categories_controller.rb:20:in `index'
redmine   | lib/redmine/sudo_mode.rb:61:in `sudo_mode'
yzzy commented 1 year ago

yes I know about this bug only with Postgres, MySQL works fine it's not a plugin bug directly, it's caused by Rails and _redminecrm gem interoperability

susumuf commented 1 year ago

Thanks, @yzzy

392 helps me out also.

I've verified @iwasi-1234 's fixed worked well.

alexbevi commented 1 month ago

This should be addressed by #411