Events plugin - all day not working and events can’t be cleared

Environment

Discourse Version: latest-release +154

Plugin Commit: cd8c78f

Other Plugins
discourse latest-release +154 Up to date
Official Plugin discourse-canned-replies 7555106 Up to date
Official Plugin discourse-data-explorer 86516da Up to date
discourse-etiquette 5e891a3 Up to date
discourse-events cd8c78f Up to date
discourse-locations 06c38d8 Up to date
discourse-paid-pinning 542d2dd Up to date
Official Plugin discourse-user-notes 3ed0245 Up to date
discourse-topic-list-previews 0039bea Up to date
discourse-whos-online 680fdc9 Up to date
Official Plugin discourse-yearly-review 297ccb1 Up to date
Official Plugin docker_manager 2c89085 Up to date

Steps to Reproduce

Scenario 1
Create topic
Add event date
Select date from calendar
Click done
Click to edit date
Click “Clear”
Click “Done”
Click tick to save
Receive “500 internal server error”

Scenario 2
On an existing event topic with a date/time
Click to edit event
Click “all day”
Click “Done”
Browse to topic list
Date shown as date with an (unexpected) time of 00:00

Example

Event date was set to “all day” but time shown

This is a new bug. Have been successfully using the event plugin for months without issue.

Logs

Example when trying to clear event:

Started PUT “/t/motorbike-theft-siddons-road/13778” for 213.205.194.157 at 2020-01-10 09:27:59 +0000
Processing by TopicsController#update as /
Parameters: {“event”=>nil, “slug”=>“motorbike-theft-siddons-road”, “topic_id”=>“13778”, “topic”=>{}}
Completed 500 Internal Server Error in 52ms (ActiveRecord: 0.0ms | Allocations: 6489)
NoMethodError (undefined method []' for nil:NilClass) /var/www/discourse/plugins/discourse-events/plugin.rb:281:in block (2 levels) in activate!’
(END)

2 Likes