fix(member-events): confirm actions reliably and normalize duplicate titles

This commit is contained in:
Jürgen Mummert
2026-03-01 10:22:53 +01:00
parent ccf60a31e7
commit 3942569fb3
4 changed files with 44 additions and 6 deletions
@@ -65,7 +65,14 @@ class MemberEventsController extends AbstractFrontendModuleController
if ('toggle_published' === $action) {
$this->eventRepository->togglePublished($eventId);
} elseif ('duplicate' === $action) {
$this->eventRepository->duplicate($eventId);
$newEventId = $this->eventRepository->duplicate($eventId);
if ($newEventId > 0 && $editPage instanceof PageModel) {
return new RedirectResponse($this->generateContentUrl($editPage, [
'event' => (string) $newEventId,
'ref' => base64_encode($backUrl),
]));
}
} elseif ('delete' === $action) {
$this->eventRepository->delete($eventId);
}