Created on 22 January 2018, almost 7 years ago
Updated 8 October 2023, about 1 year ago

Hello,

Under a certain condition, saving a node with a datetime_range_timezone field can produce a HTTP/5XX condition.

To replicate this behavior:

1) Add a datetime_range_timezone field to a content type. This field should not be required.
2) Create a new piece of content, giving a value for the start date, but deleting all fields from the end date.
3) Save the node.

Notice that the request fails with the an error similar to the following:

Error: Call to a member function format() on null in Drupal\datetime_range_timezone\Plugin\Field\FieldWidget\DateRangeTimezone->massageFormValues() (line 63 of modules/contrib/datetime_range_timezone/src/Plugin/Field/FieldWidget/DateRangeTimezone.php).

--

If the end date is required, should there be validation in place to handle this more gracefully?

Regards,
Luke

πŸ› Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States psu-luke.leber

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024