From 9f86a5240d146af97716debb1951314d72ed1271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Mon, 12 Jan 2026 11:28:22 +0100 Subject: [PATCH] add files uuid --- src/Service/MeilisearchFileHelper.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Service/MeilisearchFileHelper.php b/src/Service/MeilisearchFileHelper.php index 4a90d34..44fc947 100644 --- a/src/Service/MeilisearchFileHelper.php +++ b/src/Service/MeilisearchFileHelper.php @@ -132,10 +132,11 @@ class MeilisearchFileHelper $normalizedPath = (string) $fileModel->path; $uuidBin = $fileModel->uuid; - $uuid = StringUtil::binToUuid($uuidBin); + $uuid = StringUtil::binToUuid($uuidBin); + $canonicalUrl = '/' . ltrim($normalizedPath, '/'); $this->log('UUID resolved', [ - 'path' => $normalizedPath, + 'path' => $canonicalUrl, 'uuid' => $uuid, ]); @@ -201,7 +202,7 @@ class MeilisearchFileHelper 'tstamp' => $now, 'last_seen' => $now, 'type' => $type, - 'url' => $cleanUrl, + 'url' => $canonicalUrl, 'page_id' => $pageId, 'file_mtime' => $mtime, 'checksum' => $checksum, @@ -227,7 +228,7 @@ class MeilisearchFileHelper 'tstamp' => $now, 'last_seen' => $now, 'type' => $type, - 'url' => $cleanUrl, + 'url' => $canonicalUrl, 'title' => $title ?? basename($normalizedPath), 'page_id' => $pageId, 'file_mtime' => $mtime,