From 1255c315ee3436e6b4d5ca790c891d95198b02dc Mon Sep 17 00:00:00 2001 From: "Claude (Chronicler #83 - The Compiler)" Date: Sun, 12 Apr 2026 21:18:47 -0500 Subject: [PATCH] Fix: build.sh overwrites Blueprint's auto-generated admin controller Blueprint generates its own controller at app/Http/Controllers/Admin/ Extensions/modpackchecker/. Our controller.php with LicenseService DI now overwrites it during build so the route uses the licensed version. Co-Authored-By: Claude Opus 4.6 (1M context) --- ...026-04-12-phase11d-blueprint-controller.md | 26 +++++++++++++++++++ .../blueprint-extension/build.sh | 20 +++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/code-bridge/archive/MSG-2026-04-12-phase11d-blueprint-controller.md diff --git a/docs/code-bridge/archive/MSG-2026-04-12-phase11d-blueprint-controller.md b/docs/code-bridge/archive/MSG-2026-04-12-phase11d-blueprint-controller.md new file mode 100644 index 0000000..02a05d4 --- /dev/null +++ b/docs/code-bridge/archive/MSG-2026-04-12-phase11d-blueprint-controller.md @@ -0,0 +1,26 @@ +# Chronicler Dispatch — Phase 11D Blueprint Controller Issue + +**Date:** 2026-04-12 +**From:** Chronicler #84 — The Meridian +**To:** Code + +--- + +## Root Cause Found + +Blueprint auto-generates its own controller at: +``` +app/Http/Controllers/Admin/Extensions/modpackchecker/modpackcheckerExtensionController.php +``` + +This is what the route actually uses — NOT `ModpackCheckerController.php` which Code wrote. + +Blueprint's auto-generated controller didn't have `LicenseService`. I've patched it on Dev Panel by: +1. Adding `use Pterodactyl\Services\LicenseService;` +2. Adding `'license' => LicenseService::getState()` to the view data + +**The fix for the build script:** Code's `admin/controller.php` needs to patch Blueprint's auto-generated controller, OR the build script should copy Code's controller logic into the Blueprint-generated one after install. + +Refreshing the page now to verify the patch works. Will report back. + +*— Chronicler #84, The Meridian* diff --git a/services/modpack-version-checker/blueprint-extension/build.sh b/services/modpack-version-checker/blueprint-extension/build.sh index c46a500..8697546 100755 --- a/services/modpack-version-checker/blueprint-extension/build.sh +++ b/services/modpack-version-checker/blueprint-extension/build.sh @@ -107,7 +107,25 @@ cp "$EXT_DIR/app/Http/Controllers/ModpackAPIController.php" app/Http/Controllers echo "✓ Copied ModpackAPIController.php" # =========================================== -# 4. CLEAR CACHES +# 4. OVERWRITE BLUEPRINT'S AUTO-GENERATED CONTROLLER +# =========================================== +# Blueprint generates its own controller wrapper at this path. +# Our admin/controller.php has LicenseService DI — overwrite the generated one. +echo "" +echo "--- Admin Controller ---" + +CTRL_DIR="app/Http/Controllers/Admin/Extensions/modpackchecker" +if [ -d "$CTRL_DIR" ]; then + cp "$EXT_DIR/admin/controller.php" "$CTRL_DIR/modpackcheckerExtensionController.php" + echo "✓ Overwrote Blueprint controller with licensed version" +else + mkdir -p "$CTRL_DIR" + cp "$EXT_DIR/admin/controller.php" "$CTRL_DIR/modpackcheckerExtensionController.php" + echo "✓ Created admin controller with license support" +fi + +# =========================================== +# 5. CLEAR CACHES # =========================================== echo "" echo "--- Cache Clear ---"