Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open calendar occurs 500 error think it could be umcompatible with redmine_multiprojects_issue #74

Closed
archonwang opened this issue Apr 24, 2016 · 12 comments · Fixed by #84

Comments

@archonwang
Copy link
Contributor

archonwang commented Apr 24, 2016

when I opened calendar, it occured 500 error ,how to solve it? Thanks.
the error log is

Completed 500 Internal Server Error in 252ms (Views: 138.6ms | ActiveRecord: 20.8ms)

ActiveRecord::ConfigurationError ( <Issue id: 2, tracker_id: 1, project_id: 1, subject: "Demo Bug 100", description: "test descriptions...", due_date: nil, category_id: nil, status_id: 1, assigned_to_id: nil, priority_id: 2, fixed_version_id: nil, author_id: 1, lock_version: 1, created_on: "2016-04-08 05:27:59", updated_on: "2016-04-08 05:27:59", start_date: "2016-04-08", done_ratio: 10, estimated_hours: nil, parent_id: nil, root_id: 2, lft: 1, rgt: 2, is_private: false, closed_on: nil, answers_on_secondary_projects: true>):
plugins/advanced_roadmap_v2/lib/advanced_roadmap/calendars_controller_patch.rb:19:in add_milestones' lib/redmine/sudo_mode.rb:63:insudo_mode'

@archonwang
Copy link
Contributor Author

archonwang commented Apr 24, 2016

the ActiveRecord::ConfigurationError information is:

Issue id: 2, tracker_id: 1, project_id: 1, subject: "Demo Bug 100", description: "test descriptions...", due_date: nil, category_id: nil, status_id: 1, assigned_to_id: nil, priority_id: 2, fixed_version_id: nil, author_id: 1, lock_version: 1, created_on: "2016-04-08 05:27:59", updated_on: "2016-04-08 05:27:59", start_date: "2016-04-08", done_ratio: 10, estimated_hours: nil, parent_id: nil, root_id: 2, lft: 1, rgt: 2, is_private: false, closed_on: nil, answers_on_secondary_projects: true

@archonwang
Copy link
Contributor Author

by the way I installed some plugin as follows:

redmine_multiprojects_issue
redmine_base_select2

is there something wrong with them?

@Coren
Copy link
Owner

Coren commented Apr 24, 2016

Maybe it's a compatibility problem between plugins, yes.

Are you able to reproduce your problem without those plugins ?

@archonwang
Copy link
Contributor Author

@Coren ,Thanks for your replies.

I install the plugin redmine_multiprojects_issue and found it is not compatibility with advanced roadmap V2.. .. any solutions? Thanks.

@archonwang
Copy link
Contributor Author

I installed a new environment to test it with advanced_roavdmap_v2 and redmine_multiprojects_issue
error log

Started GET "/projects/demo1111/issues/calendar" for 172.20.10.4 at 2016-05-02 06:36:34 +0800
Processing by CalendarsController#show as HTML
Parameters: {"project_id"=>"demo1111"}
Current user: admin (id=1)
Rendered queries/_filters.html.erb (4.9ms)
Rendered common/_calendar.html.erb (11.1ms)
Rendered plugins/advanced_roadmap_v2/app/views/hooks/_milestones.html.erb (1.5ms)
Rendered issues/_sidebar.html.erb (5.6ms)
Rendered calendars/show.html.erb within layouts/base (29.3ms)
Rendered plugins/advanced_roadmap_v2/app/views/hooks/_stylesheet.html.erb (0.3ms)
Completed 500 Internal Server Error in 184ms (Views: 48.5ms | ActiveRecord: 54.6ms)

ActiveRecord::ConfigurationError (#<Issue id: 1, tracker_id: 1, project_id: 1, subject: "test1111", description: "", due_date: nil, category_id: nil, status_id: 1, assigned_to_id: nil, priority_id: 2, fixed_version_id: nil, author_id: 1, lock_version: 1, created_on: "2016-05-01 22:32:23", updated_on: "2016-05-01 22:32:35", start_date: "2016-05-02", done_ratio: 0, estimated_hours: nil, parent_id: nil, root_id: 1, lft: 1, rgt: 2, is_private: false, closed_on: nil, answers_on_secondary_projects: true>):
plugins/advanced_roadmap_v2/lib/advanced_roadmap/calendars_controller_patch.rb:19:in add_milestones' lib/redmine/sudo_mode.rb:63:insudo_mode'

@archonwang archonwang changed the title open calendar occurs 500 error open calendar occurs 500 error think it could be umcompatible with redmine_multiprojects_issue May 1, 2016
@archonwang
Copy link
Contributor Author

Could you please help me to check it ? Thanks a lot.
nanego/redmine_multiprojects_issue#15

@archonwang
Copy link
Contributor Author

I submit the debug information for it.

I, [2016-05-13T09:20:16.074572 #16016] INFO -- : Started GET "/projects/demo/issues/calendar" for 192.168.60.239 at 2016-05-13 09:20:16 +0800
I, [2016-05-13T09:20:16.083749 #16016] INFO -- : Processing by CalendarsController#show as HTML
I, [2016-05-13T09:20:16.083871 #16016] INFO -- : Parameters: {"project_id"=>"demo"}
I, [2016-05-13T09:20:16.090629 #16016] INFO -- : Current user: admin (id=1)
I, [2016-05-13T09:20:16.249715 #16016] INFO -- : Rendered queries/_filters.html.erb (12.8ms)
I, [2016-05-13T09:20:16.318254 #16016] INFO -- : Rendered common/_calendar.html.erb (34.4ms)
I, [2016-05-13T09:20:16.322969 #16016] INFO -- : Rendered plugins/redmine_graphs/app/views/hooks/redmine_graphs/_view_issues_sidebar_issues_bottom.html.erb (1.1ms)
I, [2016-05-13T09:20:16.326285 #16016] INFO -- : Rendered plugins/advanced_roadmap_v2/app/views/hooks/_milestones.html.erb (2.1ms)
I, [2016-05-13T09:20:16.327984 #16016] INFO -- : Rendered plugins/redmine_issue_templates/app/views/issue_templates/_issue_template_link.html.erb (0.9ms)
I, [2016-05-13T09:20:16.333431 #16016] INFO -- : Rendered plugins/redmine_tags/app/views/issues/_tags_sidebar.html.erb (4.8ms)
I, [2016-05-13T09:20:16.370026 #16016] INFO -- : Rendered plugins/redmine_tweaks/app/views/application/_global_sidebar.html.erb (0.2ms)
I, [2016-05-13T09:20:16.370369 #16016] INFO -- : Rendered issues/_sidebar.html.erb (50.5ms)
I, [2016-05-13T09:20:16.370644 #16016] INFO -- : Rendered calendars/show.html.erb within layouts/base (137.1ms)
I, [2016-05-13T09:20:16.379833 #16016] INFO -- : Rendered plugins/advanced_roadmap_v2/app/views/hooks/_stylesheet.html.erb (0.3ms)
I, [2016-05-13T09:20:16.381450 #16016] INFO -- : Rendered plugins/quick_edit/app/views/hooks/_quick_edit_base_head.html.erb (0.2ms)
I, [2016-05-13T09:20:16.383277 #16016] INFO -- : Rendered plugins/redmine__select2/app/views/redmine__select2/_includes.html.erb (0.6ms)
I, [2016-05-13T09:20:16.384030 #16016] INFO -- : redmine_highlightjs2: supported browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
I, [2016-05-13T09:20:16.390181 #16016] INFO -- : Rendered inline template (0.7ms)
I, [2016-05-13T09:20:16.393920 #16016] INFO -- : Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.6ms)
I, [2016-05-13T09:20:16.435737 #16016] INFO -- : Rendered plugins/redmine_tweaks/app/views/application/_global_header.erb (7.5ms)
I, [2016-05-13T09:20:16.544115 #16016] INFO -- : Rendered plugins/progressive_projects_list/app/views/application/_progressive_sidebar.html.erb (0.2ms)
I, [2016-05-13T09:20:16.581217 #16016] INFO -- : Rendered plugins/progressive_projects_list/app/views/application/_progressive_recent_projects.html.erb (0.3ms)
I, [2016-05-13T09:20:16.615382 #16016] INFO -- : Rendered plugins/redmine_tweaks/app/views/application/_global_content.erb (0.3ms)
I, [2016-05-13T09:20:16.617240 #16016] INFO -- : Rendered plugins/quick_edit/app/views/hooks/_quick_edit_base_bottom.html.erb (0.6ms)
I, [2016-05-13T09:20:16.623180 #16016] INFO -- : Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (4.7ms)
I, [2016-05-13T09:20:16.657127 #16016] INFO -- : Rendered plugins/redmine_tweaks/app/views/application/_global_footer.erb (0.2ms)
I, [2016-05-13T09:20:16.697530 #16016] INFO -- : Completed 500 Internal Server Error in 613ms (Views: 448.0ms | ActiveRecord: 61.7ms)
I, [2016-05-13T09:20:16.797376 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_request.text.erb (1.5ms)
I, [2016-05-13T09:20:16.822746 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.6ms)
I, [2016-05-13T09:20:16.850061 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_session.text.erb (1.9ms)
I, [2016-05-13T09:20:16.851151 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.3ms)
I, [2016-05-13T09:20:16.879749 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_environment.text.erb (2.9ms)
I, [2016-05-13T09:20:16.880811 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.2ms)
I, [2016-05-13T09:20:16.906875 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_backtrace.text.erb (0.4ms)
I, [2016-05-13T09:20:16.907938 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.2ms)
I, [2016-05-13T09:20:16.908129 #16016] INFO -- : Rendered /usr/local/rvm/gems/ruby-2.2.4@newgemset/gems/exception_notification-4.1.4/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb (137.9ms)
F, [2016-05-13T09:20:18.597632 #16016] FATAL -- :
ActiveRecord::ConfigurationError (#<Issue id: 1, tracker_id: 1, project_id: 1, subject: "Demo Bug 001", description: "<h2 style="font-style:italic;">conditions\r\n\r\n<div s...", due_date: nil, category_id: nil, status_id: 3, assigned_to_id: 1, priority_id: 3, fixed_version_id: 1, author_id: 1, lock_version: 5, created_on: "2016-04-08 05:25:04", updated_on: "2016-05-05 04:26:56", start_date: "2016-04-08", done_ratio: 70, estimated_hours: nil, parent_id: nil, root_id: 1, lft: 1, rgt: 2, is_private: false, closed_on: nil, expiration_date: "2016-04-09 05:25:04", first_response_date: nil, issue_sla: 24.0, answers_on_secondary_projects: true>):
plugins/advanced_roadmap_v2/lib/advanced_roadmap/calendars_controller_patch.rb:19:in add_milestones' lib/redmine/sudo_mode.rb:63:insudo_mode'

@quanvn
Copy link

quanvn commented Sep 7, 2016

@archonwang multiple_project and advanced_roadmap(/v2) are not compatible but problem only occurs when displaying the milestone on the calendar.
If you can bear with it (ie not display milestone on the calendar) then you can do this
open init.rb file, find the line CalendarsController.send(:include, AdvancedRoadmap::CalendarsControllerPatch) and comment it out (so it should look like)
#CalendarsController.send(:include, AdvancedRoadmap::CalendarsControllerPatch) then restart redmine. Callendar will work, and roadmap too

@archonwang
Copy link
Contributor Author

@quanvn , Thanks. I will try it. If it could been efficient, I will make a pull request.

@archonwang
Copy link
Contributor Author

Hi, @quanvn,
I tested it and it worked. Thanks.
it seems not a complete solution, but it could make the calendar worked.
I am sorry that I not similar with the ruby, but ar present I could use the calendar well.
Thanks so much.

@quanvn
Copy link

quanvn commented Sep 8, 2016

@archonwang Yes, it is a quick and dirty workaround.
But here is a real and fundamental solution (I hope).

  1. Open file lib/calendars_controller_patch.rb, find line @query.milestones ...(line 17 in my version)
  2. and change it to @query.becomes(Query).milestones....
  3. save it and remember to uncomment the line Calendars... in init.rb file
    CalendarsController.send(:include, AdvancedRoadmap::CalendarsControllerPatch)
    4.restart redmine, then you have calendar working with milestone shown on too

@archonwang
Copy link
Contributor Author

archonwang commented Sep 8, 2016

@quanvn,
I will try it, Thanks a lot.

archonwang added a commit to archonwang/redmine_advanced_roadmap_v2 that referenced this issue Sep 9, 2016
@archonwang archonwang mentioned this issue Sep 9, 2016
@Coren Coren closed this as completed Oct 31, 2016
@archonwang archonwang mentioned this issue Mar 9, 2017
Coren added a commit that referenced this issue Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants