Bugfix
This commit is contained in:
@@ -101,12 +101,20 @@ class MeilisearchIndexService
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($data as $entry) {
|
foreach ($data as $entry) {
|
||||||
if (
|
if (($entry['@type'] ?? null) !== 'https://schema.org/Event') {
|
||||||
($entry['@type'] ?? null) === 'https://schema.org/Event'
|
continue;
|
||||||
&& !empty($entry['startDate'])
|
}
|
||||||
) {
|
|
||||||
$timestamp = strtotime($entry['startDate']);
|
// ✅ Contao-JSON-LD (vollqualifiziert)
|
||||||
return $timestamp ?: null;
|
if (!empty($entry['https://schema.org/startDate'])) {
|
||||||
|
$ts = strtotime($entry['https://schema.org/startDate']);
|
||||||
|
return $ts ?: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🛟 Fallback (falls Contao das irgendwann ändert)
|
||||||
|
if (!empty($entry['startDate'])) {
|
||||||
|
$ts = strtotime($entry['startDate']);
|
||||||
|
return $ts ?: null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user