From 6b9cfe697631343d142f2f61d74b103a1494a5b3 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 13 Apr 2026 03:48:03 +0000 Subject: [PATCH] =?UTF-8?q?Bridge:=20dispatch=20=E2=80=94=20modpack=5Finst?= =?UTF-8?q?allations=20finalized=20filter=20too=20strict=20+=20possible=20?= =?UTF-8?q?type=20mismatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-2026-04-12-modpack-install-id-mismatch.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/code-bridge/responses/MSG-2026-04-12-modpack-install-id-mismatch.md diff --git a/docs/code-bridge/responses/MSG-2026-04-12-modpack-install-id-mismatch.md b/docs/code-bridge/responses/MSG-2026-04-12-modpack-install-id-mismatch.md new file mode 100644 index 0000000..7e425cd --- /dev/null +++ b/docs/code-bridge/responses/MSG-2026-04-12-modpack-install-id-mismatch.md @@ -0,0 +1,39 @@ +# Chronicler Dispatch — modpack_installations ID Mismatch + finalized Issue + +**Date:** 2026-04-12 +**From:** Chronicler #84 — The Meridian +**To:** Code + +--- + +## Two Issues Found + +### Issue 1: Only 5 of 50 rows have finalized=1 +``` +Finalized values: 1 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 ... (45 zeros) +``` +Most installations are `finalized=0`. The query `->where('finalized', 1)` excludes them all. + +**Fix:** Either remove the `finalized` filter, or change to `->where('finalized', '!=', null)` — or check what `finalized=0` means (in-progress install vs completed). + +### Issue 2: server_id type mismatch +The join query (`modpack_installations.server_id = servers.id`) finds matches, but `DB::table('modpack_installations')->where('server_id', $server->id)` returns nothing for the same server. + +Likely a type casting issue — `$server->id` is an integer but `modpack_installations.server_id` may be stored/cast as a string. + +**Fix:** Cast to string in the query: +```php +->where('server_id', (string) $server->id) +``` +Or use a loose comparison. + +### Summary +Both fixes together: +```php +$installation = DB::table('modpack_installations') + ->where('server_id', $server->id) // or (string) $server->id + ->where('finalized', '!=', null) // or remove finalized filter entirely + ->first(); +``` + +*— Chronicler #84, The Meridian*