redmine_favourite_projects
redmine_favourite_projects copied to clipboard
Internal error
I create “Favorite Projects”, “Internal Error” appears, but the project is still being added. True, sometimes more than I need.
Environment:
Redmine version 4.1.0.stable
Ruby version 2.6.3-p62 (2019-04-16) [x86_64-linux]
Rails version 5.2.4.1
Environment production
Database adapter PostgreSQL
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.7.14
Mercurial 5.2.2
Bazaar 2.5.1
Git 2.9.3
Filesystem
Xitolite 2.9.3
Redmine plugins:
additionals 2.0.23
progressive_projects_list 4.0.0
redmine_git_hosting 4.0.1
redmine_issue_badge 0.1.3
redmine_tags 4.0.0
Log file:
Started POST "/favourite_projects/add_project?id=43" for 192.168.10.10 at 2020-07-13 17:34:52 +0300 Processing by FavouriteProjectsController#add_project as HTML Parameters: {"authenticity_token"=>"xxx" "id"=>"43"} Current user: user1 (id=148) Redirected to https://rm2-test.test.local/favourite_projects/index Completed 500 Internal Server Error in 19ms (ActiveRecord: 4.4ms) ArgumentError (#allowed_to? context argument must be a Project, an Array of projects or nil): app/models/user.rb:720:in `allowed_to?' app/controllers/application_controller.rb:408:in `record_project_usage'
Hi. Need help, please. How to remove the plugin correctly? When I delete the plugin, I can't log in to redmine. Help. I use this command:
bundle exec rake redmine:plugins:migrate NAME=redmine_favourite_projects VERSION=0 RAILS_ENV=production
Log:
Redirected to https://test-redmine.srv.loc/favourite_projects/index
Completed 500 Internal Server Error in 10ms (ActiveRecord: 3.3ms)
ArgumentError (#allowed_to? context argument must be a Project, an Array of projects or nil):
app/models/user.rb:720:in `allowed_to?'
app/controllers/application_controller.rb:408:in `record_project_usage'
What to do?
okay. I did this:
$ cd /opt/redmine
$ bundle exec rake redmine:plugins:migrate NAME=redmine_favourite_projects VERSION=0 RAILS_ENV=production
$ find . -type d -name 'redmine_favourite_projects'
...
...
$ rm -rf ./public/plugins/redmine_favourite_projects
$ rm -rf ./public/plugin_assets/redmine_favourite_projects
restart apache