Hello guys.
Since https://www.drupal.org/project/drupal/issues/2794481 is on the way, and also keeping in mind there are other solutions for date range fields (like https://www.drupal.org/project/optional_end_date), I've found there is an issue at src/AddToCalTypeBase.php::extractEventDetails. This issue is being caused if "End date" is empty:
Error: Call to a member function getTimestamp() on null in Drupal\addtocal\AddToCalTypeBase->extractEventDetails() (line 81 of /var/www/html/web/modules/contrib/addtocal/src/AddToCalTypeBase.php)
By checking into the mentioned method, I've seen it's using an "&&" operator for start and end dates. Both. But, it's not valid with optional end dates. So, by just adding an extra validation, it works nice.
Patch on the way.
Comments
Comment #2
waspper commentedComment #3
waspper commentedComment #5
wxactly commentedThanks @waspper - FYI, this issue is already fixed in version 2.0. But I went ahead and merged this in to 1.x.
Comment #6
wxactly commented