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

The issue is the absence of the enable_new_ticket_message method. #180

Open
tomatoz12 opened this issue Mar 7, 2024 · 2 comments
Open

Comments

@tomatoz12
Copy link

tomatoz12 commented Mar 7, 2024

Problems,

The other pages in Redmine work fine, but a 500 error occurs only when creating a new issue within a project. Upon checking the apache2/error.log, the following error code is observed:
*ActionView::Template::Error (undefined local variable or method `enable_new_ticket_message' for

IN MY CASE,

3rd party Version

ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]

mysql --version
mysql Ver 8.0.36-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))

rails -v
Rails 6.1.7.6

How to insatll

cd $REDMINE_ROOT
  git clone -b 3.1.0 https://github.com/alphanodes/additionals.git plugins/additionals
git clone -b 3.1.0 https://www.github.com/alphanodes/additional_tags.git plugins/additional_tags
  bundle config set --local without 'development test'



//gem 'additional_tags'

bundle install
bundle exec rake redmine:plugins:migrate RAILS_ENV=production

Error Code
Attached is the full text of the error code. (*Information related to personal information has been replaced with "****masking")

App 85682 output: [7732036f-9cf3-417c-bdf8-dcb0af7434ac]   Current user: ****masking (id=****masking)
App 85682 output: [7732036f-9cf3-417c-bdf8-dcb0af7434ac]   Rendered issues/show.html.erb within layouts/base (Duration: 338.7ms | Allocations: 90538)
App 85682 output: [7732036f-9cf3-417c-bdf8-dcb0af7434ac]   Rendered layout layouts/base.html.erb (Duration: 411.0ms | Allocations: 109277)
App 85682 output: [7732036f-9cf3-417c-bdf8-dcb0af7434ac] Completed 200 OK in 526ms (Views: 355.9ms | ActiveRecord: 98.7ms | Allocations: 132534)
App 85682 output: [a94e4b90-6c3d-4af0-9672-173b4a14a8b5] Started GET "/projects/****masking/time_entries/new" for ****masking at 2024-03-07 15:38:43 +0900
App 85682 output: [a94e4b90-6c3d-4af0-9672-173b4a14a8b5] Processing by TimelogController#new as HTML
App 85682 output: [a94e4b90-6c3d-4af0-9672-173b4a14a8b5]   Parameters: {"project_id"=>"****masking"}
App 85682 output: [a94e4b90-6c3d-4af0-9672-173b4a14a8b5]   Current user: ****masking (id=****masking)
App 85682 output: [a94e4b90-6c3d-4af0-9672-173b4a14a8b5]   Rendered timelog/new.html.erb within layouts/base (Duration: 286.9ms | Allocations: 56945)
App 85682 output: [a94e4b90-6c3d-4af0-9672-173b4a14a8b5]   Rendered layout layouts/base.html.erb (Duration: 352.6ms | Allocations: 72644)
App 85682 output: [a94e4b90-6c3d-4af0-9672-173b4a14a8b5] Completed 200 OK in 410ms (Views: 278.0ms | ActiveRecord: 90.8ms | Allocations: 79781)
App 85682 output: [da3de656-5b1d-4079-9bff-5f551fd52c6c] Started GET "/projects/****masking/issues" for ****masking at 2024-03-07 15:38:54 +0900
App 85682 output: [da3de656-5b1d-4079-9bff-5f551fd52c6c] Processing by IssuesController#index as HTML
App 85682 output: [da3de656-5b1d-4079-9bff-5f551fd52c6c]   Parameters: {"project_id"=>"****masking"}
App 85682 output: [da3de656-5b1d-4079-9bff-5f551fd52c6c]   Current user: ****masking (id=****masking)
App 85682 output: [da3de656-5b1d-4079-9bff-5f551fd52c6c]   Rendered issues/index.html.erb within layouts/base (Duration: 135.8ms | Allocations: 57381)
App 85682 output: [da3de656-5b1d-4079-9bff-5f551fd52c6c]   Rendered layout layouts/base.html.erb (Duration: 182.6ms | Allocations: 72557)
App 85682 output: [da3de656-5b1d-4079-9bff-5f551fd52c6c] Completed 200 OK in 315ms (Views: 166.0ms | ActiveRecord: 89.1ms | Allocations: 96738)
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] Started GET "/projects/ ****masking/issues/new" for ****masking at 2024-03-07 15:46:16 +0900
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] Processing by IssuesController#new as HTML
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]   Parameters: {"project_id"=>"****masking"}
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]   Current user: ****masking (id=****masking)
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]   Rendered issues/new.html.erb within layouts/base (Duration: 60.7ms | Allocations: 8369)
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]   Rendered layout layouts/base.html.erb (Duration: 61.0ms | Allocations: 8403)
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] Completed 500 Internal Server Error in 147ms (ActiveRecord: 28.2ms | Allocations: 17946)
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] ActionView::Template::Error (undefined local variable or method `enable_new_ticket_message' for #<Project id: 2,~~ ****masking"
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]     1: - if @issue.new_ticket_message.present?
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]     2:   .new-ticket-message.nodata.nodata-left
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]     3:     = textilizable @issue, :new_ticket_message, inline_attachments: false
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402]
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] plugins/additionals/lib/additionals/patches/project_patch.rb:125:in `active_new_ticket_message'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] plugins/additionals/lib/additionals/patches/issue_patch.rb:61:in `new_ticket_message'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] plugins/additionals/app/views/issues/_new_ticket_message.html.slim:1
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook/view_listener.rb:61:in `block (2 levels) in render_on'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook/view_listener.rb:59:in `map'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook/view_listener.rb:59:in `block in render_on'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook.rb:66:in `block (2 levels) in call_hook'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook.rb:66:in `each'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook.rb:66:in `block in call_hook'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook.rb:63:in `call_hook'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/hook.rb:101:in `call_hook'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] app/views/issues/new.html.erb:3
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] app/controllers/issues_controller.rb:140:in `block (2 levels) in new'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] app/controllers/issues_controller.rb:139:in `new'
App 85682 output: [206adfc6-d95b-456e-85fd-1840e7c29402] lib/redmine/sudo_mode.rb:61:in `sudo_mode'
@alexandermeindl
Copy link
Collaborator

Hi @tomatoz12,

this looks like database migration is missing. Are you sure you run bundle exec rake redmine:plugins:migrate?

@tomatoz12
Copy link
Author

Aha, then I have a guess.
I migrated only the data from the DB of my old version of Red Mine (3.2.1) to the new Red Mine.
Maybe that's where the DB crash comes from.
If I do encounter any problems after retrying, I will visit again.

Thx, :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants