diff --git a/src/module-elasticsuite-tracker/Model/EventIndex.php b/src/module-elasticsuite-tracker/Model/EventIndex.php index 2ec2d01ea..71eb5a0f2 100644 --- a/src/module-elasticsuite-tracker/Model/EventIndex.php +++ b/src/module-elasticsuite-tracker/Model/EventIndex.php @@ -76,6 +76,11 @@ public function indexEvents($events) foreach ($events as $event) { if (isset($event['page']['store_id'])) { + // Previous "date" column has been renamed to "created_at" in db_schema.xml + if (!isset($event['date'])) { + $event['date'] = $event['created_at']; + } + $date = substr($event['date'], 0, 7); $index = $this->indexResolver->getIndex(self::INDEX_IDENTIFIER, $event['page']['store_id'], $date); if ($index !== null) {