From 1d200fc3f6a701fd20465000b4d8fa21bb8eb6dd Mon Sep 17 00:00:00 2001 From: Chaim Date: Wed, 27 May 2026 08:52:55 +0000 Subject: [PATCH] fix(installer): seed AssistantPrompt rows with skipAll to bypass beforeSave user-service requirement The first prod install with v2.10.0 failed silently because saveEntity invokes beforeSave hooks that require a 'user' service which isn't bound during the script. Pass skipAll=true so the seed is purely a data insert. Verified on prod 2026-05-27: all 7 default prompts seeded successfully. --- scripts/AfterInstall.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/AfterInstall.php b/scripts/AfterInstall.php index 6a8e87d..bef0447 100644 --- a/scripts/AfterInstall.php +++ b/scripts/AfterInstall.php @@ -72,7 +72,10 @@ class AfterInstall 'content' => $row['content'] ?? '', 'isActive' => true, ]); - $entityManager->saveEntity($entity); + // skipAll bypasses beforeSave hooks that require a logged-in user + // service (install runs without a session) and ACL checks (we're + // seeding firm-wide defaults; no user is implicated). + $entityManager->saveEntity($entity, ['skipAll' => true]); $created++; }