farend / redmine_message_customize

This is a plugin for Redmine.
GNU General Public License v2.0
29 stars 11 forks source link

Only allow plugin text to be overwritten when there is 35_change_load_order_locales #30

Closed ishikawa999 closed 5 years ago

ishikawa999 commented 5 years ago

related: #25

akiko-pusu commented 5 years ago

Hi! @ishikawa999 I love this plugin and try to use in my local and Docker env.

But I saw something trouble when use this plugin above env. When start rails application with rails s command, loading of CustomMessageSetting will get caught in an endless loop.

This problem is fixed on your develop branch on commit: f4993cc815b83 :) I hope this would be any help.


Here is FYI.

This is my local env’s development log.


Started GET "/" for ::1 at 2019-09-04 13:27:08 +0900
Processing by WelcomeController#index as HTML
   (2.5ms)  SELECT MAX("settings"."updated_on") FROM "settings"
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
  Setting Load (1.0ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "rest_api_enabled"], ["LIMIT", 1]]
  AnonymousUser Load (1.2ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('AnonymousUser') AND "users"."lastname" = ? LIMIT ?  [["lastname", "Anonymous"], ["LIMIT", 1]]
  Current user: anonymous
  Setting Load (0.4ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "login_required"], ["LIMIT", 1]]
  Setting Load (0.6ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "force_default_language_for_anonymous"], ["LIMIT", 1]]
  CustomMessageSetting Load (0.2ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "plugin_redmine_message_customize"], ["LIMIT", 1]]
  CACHE CustomMessageSetting Load (0.0ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "plugin_redmine_message_customize"], ["LIMIT", 1]]
  CACHE CustomMessageSetting Load (0.0ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "plugin_redmine_message_customize"], ["LIMIT", 1]]
  CACHE CustomMessageSetting Load (0.0ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "plugin_redmine_message_customize"], ["LIMIT", 1]]
  CACHE CustomMessageSetting Load (0.0ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "plugin_redmine_message_customize"], ["LIMIT", 1]]
  CACHE CustomMessageSetting Load (0.0ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "plugin_redmine_message_customize"], ["LIMIT", 1]]
  CACHE CustomMessageSetting Load (0.0ms)  SELECT  "settings".* FROM "settings" WHERE "settings"."name" = ? ORDER BY "settings"."id" DESC LIMIT ?  [["name", "plugin_redmine_message_customize"], ["LIMIT", 1]]

......

The redline application does not return a response and I can’t stop process by Ctrl-C. (Only I can kill the process.)

1. Local Redmine with SQLite3 (RAILS_ENV=development)

2. Docker on Heroku

It seems this problem is caused in my Heroku env. I can’t confirm the container’s log file, and load balancer (web server in front of the rails app) returns 503 error because of timeout.

※Now I can run Heroku’s docker container correctly with redmine_message_customize develop branch :)

ishikawa999 commented 5 years ago

@akiko-pusu

Thank you for sharing the issue. Your report is very easy to understand and helped me solve the problem!!

I was able to reproduce this problem even at my environment. This was a problem fixed in https://github.com/ishikawa999/redmine_message_customize/pull/13 in the developer branch, I didn't realize that the same problem occurred in the master branch.

I merged the develop branch into the master branch. This should have solved the problem.

akiko-pusu commented 5 years ago

Thanks, I confirmed it!