From f244d1f52aade47386fd94fd5ee362c9bee0b3f7 Mon Sep 17 00:00:00 2001 From: webfarben Date: Sun, 15 Mar 2026 19:31:28 +0100 Subject: [PATCH] Fix: SQL ORDER BY ohne nicht vorhandene sorting-Spalten in News/Event-Kopie --- src/Service/DummyCopier.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/DummyCopier.php b/src/Service/DummyCopier.php index d134a2f..001ff8b 100644 --- a/src/Service/DummyCopier.php +++ b/src/Service/DummyCopier.php @@ -426,7 +426,7 @@ final class DummyCopier $map[(int) $sourceArchiveId] = $newArchiveId; $result->copiedNewsArchives++; - $newsIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_news WHERE pid = ? ORDER BY date, sorting, id', [(int) $sourceArchiveId]); + $newsIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_news WHERE pid = ? ORDER BY date, id', [(int) $sourceArchiveId]); foreach ($newsIds as $newsId) { $newsRow = $this->fetchRow('tl_news', (int) $newsId); @@ -492,7 +492,7 @@ final class DummyCopier $map[(int) $sourceCalendarId] = $newCalendarId; $result->copiedCalendars++; - $eventIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_calendar_events WHERE pid = ? ORDER BY startTime, sorting, id', [(int) $sourceCalendarId]); + $eventIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_calendar_events WHERE pid = ? ORDER BY startTime, id', [(int) $sourceCalendarId]); foreach ($eventIds as $eventId) { $eventRow = $this->fetchRow('tl_calendar_events', (int) $eventId);