From 3b5c830c01ef9716564f01de15547e5168ffbc0b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 23 Apr 2026 17:03:48 +0200 Subject: [PATCH] fix: fix initial addressbook sync skipping items due to ordering Signed-off-by: Robin Appelman --- apps/dav/lib/CardDAV/CardDavBackend.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 07738053b46..3b11c4c365c 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -980,7 +980,8 @@ class CardDavBackend implements BackendInterface, SyncSupport { ->from('cards') ->where( $qb->expr()->eq('addressbookid', $qb->createNamedParameter($addressBookId)) - ); + ) + ->orderBy('id'); // No synctoken supplied, this is the initial sync. $qb->setMaxResults($limit); $stmt = $qb->executeQuery();