Red warning while adding or modify tags: "Start date: The date '-0001-11-20' is before ...."

Tag Manager at Matomo 3.12.0

Warning:

Problem:

Solution:

(I am short in time, so ATM this screenshots only)

Hi,

This issue has been fixed in

If you can’t wait for the next release, you can manually apply the patch to the plugins/TagManager/Model/Tag.php:

diff --git a/Model/Tag.php b/Model/Tag.php
index a30b47a..c848acc 100644
--- a/Model/Tag.php
+++ b/Model/Tag.php
@@ -145,8 +145,8 @@ public function updateContainerTag($idSite, $idContainerVersion, $idTag, $name,
                 'fire_limit' => $fireLimit,
                 'fire_delay' => $fireDelay,
                 'priority' => $priority,
-                'start_date' => $startDate,
-                'end_date' => $endDate
+                'start_date' => empty($startDate) ? null : $startDate,
+                'end_date' => empty($endDate) ? null : $endDate,
             );
             $this->updateTagColumns($idSite, $idContainerVersion, $idTag, $columns);
         }