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.

CommentFileSizeAuthor
#2 3175296-2.patch677 byteswaspper

Comments

waspper created an issue. See original summary.

waspper’s picture

StatusFileSize
new677 bytes
waspper’s picture

Status: Active » Needs review

  • wxactly committed e59132d on 8.x-1.x authored by waspper
    Issue #3175296 by waspper: Optional end date (pending validation)
    
wxactly’s picture

Status: Needs review » Fixed

Thanks @waspper - FYI, this issue is already fixed in version 2.0. But I went ahead and merged this in to 1.x.

wxactly’s picture

Version: 8.x-1.x-dev » 8.x-2.0-beta3
Status: Fixed » Closed (fixed)