New recurrent monthly todo error: "Every other nth month may not be empty for recurrence setting"
Hi, after a day of trying to fix this I have no clue left where this error is coming from:
When I try to create a new recurrent todo, with monthly recurrent period, whatever the other settings are, I always get the following error:
"Every other nth month may not be empty for recurrence setting"
Somehow the monthly_every_x_month and/or monthly_every_x_month2 values do not get transmitted to the recurring_todos_controller.rb
Everything else works fine, i.e. in particular creating recurrent todos with other than monthly recurrence.
I've updated to most recent tracks 2.2.1, database is sqlite3.
ruby --version: ruby 1.8.7 (2011-12-28 patchlevel 357) [i686-linux]
log/production.log:
When I try to create a new recurrent todo, with monthly recurrent period, whatever the other settings are, I always get the following error:
"Every other nth month may not be empty for recurrence setting"
Somehow the monthly_every_x_month and/or monthly_every_x_month2 values do not get transmitted to the recurring_todos_controller.rb
Everything else works fine, i.e. in particular creating recurrent todos with other than monthly recurrence.
I've updated to most recent tracks 2.2.1, database is sqlite3.
ruby --version: ruby 1.8.7 (2011-12-28 patchlevel 357) [i686-linux]
log/production.log:
Started POST "/recurring_todos" for XXX at Tue Apr 02 22:53:09 +0200 2013
Processing by RecurringTodosController#create as JS
Parameters: {"29"=>"t", "28"=>"_", "27"=>"&", "26"=>"o", "25"=>"d", "24"=>"o", "23"=>"t", "22"=>"_", "21"=>"g", "20"=>"n", "_source_view"=>"recurring_todo", "9"=>"i", "8"=>"v", "7"=>"_", "6"=>"e", "5"=>"c", "4"=>"r", "3"=>"u", "2"=>"o", "1"=>"s", "0"=>"_", "project_name"=>"MMOGTE", "recurring_todo"=>{"weekly_every_x_week"=>"1", "recurring_show_always"=>"1", "end_date"=>"", "monthly_every_xth_day"=>"1", "yearly_every_xth_day"=>"1", "start_from"=>"02.04.2013", "monthly_day_of_week"=>"2", "recurring_show_days_before"=>"0", "ends_on"=>"no_end_date", "recurring_target"=>"show_from_date", "description"=>"test", "notes"=>"dadidu", "monthly_every_x_month2"=>"1", "yearly_month_of_year2"=>"4", "daily_every_x_days"=>"1", "weekly_return_tuesday"=>"t", "monthly_every_x_month"=>"1", "yearly_selector"=>"yearly_every_x_day", "daily_selector"=>"daily_every_x_day", "yearly_month_of_year"=>"4", "number_of_occurences"=>"", "monthly_selector"=>"monthly_every_xth_day", "monthly_every_x_day"=>"2", "yearly_every_x_day"=>"2", "yearly_day_of_week"=>"2", "recurring_period"=>"monthly"}, "utf8"=>"✓", "authenticity_token"=>"\"XXX=\"", "37"=>"=", "36"=>"e", "35"=>"m", "34"=>"a", "33"=>"n", "32"=>"_", "31"=>"g", "30"=>"a", "19"=>"i", "18"=>"r", "17"=>"r", "16"=>"u", "15"=>"c", "14"=>"e", "13"=>"r", "12"=>"=", "11"=>"w", "10"=>"e", "tag_list"=>"sci", "context_name"=>"Besorgungen"}
Rendered recurring_todos/create.js.erb (4.6ms)
Completed 200 OK in 75ms (Views: 14.8ms | ActiveRecord: 1.5ms)
Leave a comment
on 2013-06-01 16:07 *
By carsten.otto
I have the same problem with 2.2.2 (upgraded two or three times).
could you try to change the lines at line 104 from
into
and try if that solves the problem?
@recurring_todo = current_user.recurring_todos.build(p.selector_attributes)
@recurring_todo.update_attributes(p.attributes)
into
@recurring_todo = current_user.recurring_todos.build(:recurring_period => params[:recurring_period])
@recurring_todo.assign_attributes(p.selector_attributes)
@recurring_todo.update_attributes(p.attributes)
and try if that solves the problem?
on 2013-06-19 08:43 *
By carsten.otto
Reinier, that helped in my case. I just added a recurring todo for every 1st day on every "1th" month.
(In tracks-tickets:64d3e802f273c0950a213e87bbd7e70e537a3fce) fix #1406. fix #1431. set recurring_period first before setting other attributes
Branch: master
Branch: master
In tracks-tickets:4e4c9a51af7a8a24a29b221905f5261f3b18c68f fix #1406. fix #1431. set recurring_period first before setting other attributes