TracksApp / tracks

Tracks is a GTD™ web application, built with Ruby on Rails
https://www.getontracks.org/
GNU General Public License v2.0
1.18k stars 538 forks source link

Can't add Recurring todo #2591

Open svalx opened 3 years ago

svalx commented 3 years ago

Can't add Recurring todo, but other stuff works fine. изображение How I can debug this? Used last Docker container with existing MariaDB installation on OEL 8.

ZeiP commented 3 years ago

You could take a look at the container logs and see if they provide you with an error message. You can also try opening the Network Inspector from your browser by right-clicking on the page and selecting Inspect element (or similar, depending on your browser) and selecting the Network tab. Then when you retry adding the recurring todo, you should see a request that fails; see if that request has some kind of an error message in the reply.

svalx commented 3 years ago

Thank you for quick reply! I attach container to console and get an debug output. It looks like recurring todo can not works with tags? I tried add some tags to todo but no success.

I, [2021-03-15T08:51:54.379351 #1]  INFO -- : [374c5b6f-23bd-49f2-a275-349719b51985] Started POST "/recurring_todos" for 188.233.32.124 at 2021-03-15 08:51:54 +0000
I, [2021-03-15T08:51:54.381157 #1]  INFO -- : [374c5b6f-23bd-49f2-a275-349719b51985] Processing by RecurringTodosController#create as JS
I, [2021-03-15T08:51:54.381735 #1]  INFO -- : [374c5b6f-23bd-49f2-a275-349719b51985]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"Bm5xW4HItZze0ef1jdL99yrk+5CSMUEqf9OkO9ADKPvnZGFTRioL/+OUZmu/S3FE7yJmZ0dovtsIaQDocqdC3w==", "recurring_todo"=>{"description"=>"test", "notes"=>"", "recurring_period"=>"daily", "start_from"=>"15.03.2021", "ends_on"=>"no_end_date", "number_of_occurrences"=>"", "end_date"=>"", "daily_selector"=>"daily_every_x_day", "daily_every_x_days"=>"1", "weekly_every_x_week"=>"1", "weekly_return_monday"=>"m", "monthly_selector"=>"monthly_every_x_day", "monthly_every_x_day"=>"15", "monthly_every_x_month"=>"1", "monthly_every_xth_day"=>"1", "monthly_day_of_week"=>"1", "monthly_every_x_month2"=>"1", "yearly_selector"=>"yearly_every_x_day", "yearly_month_of_year"=>"3", "yearly_every_x_day"=>"15", "yearly_every_xth_day"=>"1", "yearly_day_of_week"=>"1", "yearly_month_of_year2"=>"3", "recurring_target"=>"due_date", "recurring_show_always"=>"1", "recurring_show_days_before"=>"0"}, "project_name"=>"", "context_name"=>"Здоровье", "tag_list"=>"", "_source_view"=>"recurring_todo", "_group_view_by"=>"context", "_tag_name"=>""}
D, [2021-03-15T08:51:54.384652 #1] DEBUG -- : [374c5b6f-23bd-49f2-a275-349719b51985]   User Load (0.7ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1
D, [2021-03-15T08:51:54.387319 #1] DEBUG -- : [374c5b6f-23bd-49f2-a275-349719b51985]   Preference Load (0.6ms)  SELECT `preferences`.* FROM `preferences` WHERE `preferences`.`user_id` = 2 LIMIT 1
D, [2021-03-15T08:51:54.392931 #1] DEBUG -- : [374c5b6f-23bd-49f2-a275-349719b51985]   Context Load (0.6ms)  SELECT `contexts`.* FROM `contexts` WHERE `contexts`.`user_id` = 2 AND `contexts`.`name` = 'Здоровье' ORDER BY position ASC LIMIT 1
D, [2021-03-15T08:51:54.397539 #1] DEBUG -- : [374c5b6f-23bd-49f2-a275-349719b51985]    (0.3ms)  BEGIN
D, [2021-03-15T08:51:54.398307 #1] DEBUG -- : [374c5b6f-23bd-49f2-a275-349719b51985]   User Load (0.5ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
D, [2021-03-15T08:51:54.399200 #1] DEBUG -- : [374c5b6f-23bd-49f2-a275-349719b51985]    (0.3ms)  ROLLBACK
I, [2021-03-15T08:51:54.401261 #1]  INFO -- : [374c5b6f-23bd-49f2-a275-349719b51985] Completed 500 Internal Server Error in 19ms (ActiveRecord: 3.0ms | Allocations: 4886)
F, [2021-03-15T08:51:54.402460 #1] FATAL -- : [374c5b6f-23bd-49f2-a275-349719b51985]
[374c5b6f-23bd-49f2-a275-349719b51985] NoMethodError (undefined method 'tags' for nil:NilClass):
[374c5b6f-23bd-49f2-a275-349719b51985]
[374c5b6f-23bd-49f2-a275-349719b51985] lib/is_taggable.rb:65:in '_remove_tags'
[374c5b6f-23bd-49f2-a275-349719b51985] lib/is_taggable.rb:34:in 'block in tag_with'
[374c5b6f-23bd-49f2-a275-349719b51985] lib/is_taggable.rb:31:in 'tag_with'
[374c5b6f-23bd-49f2-a275-349719b51985] lib/is_taggable.rb:23:in 'tag_list='
[374c5b6f-23bd-49f2-a275-349719b51985] app/models/recurring_todos/abstract_recurrence_pattern.rb:65:in 'build_recurring_todo'
[374c5b6f-23bd-49f2-a275-349719b51985] app/models/recurring_todos/abstract_recurring_todos_builder.rb:20:in 'build'
[374c5b6f-23bd-49f2-a275-349719b51985] app/models/recurring_todos/abstract_recurring_todos_builder.rb:29:in 'save'
[374c5b6f-23bd-49f2-a275-349719b51985] app/models/recurring_todos/recurring_todos_builder.rb:33:in 'save'
[374c5b6f-23bd-49f2-a275-349719b51985] app/controllers/recurring_todos_controller.rb:62:in 'create'
svalx commented 3 years ago

Is it normal that firstly

SELECT users.* FROM users WHERE users.id = 2 LIMIT 1

then secondly

SELECT users.* FROM users WHERE users.id = 1 LIMIT 1