]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
fix(ERP-246): add missing api1/views/site/index.php to fix ViewNotFoundException
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Sat, 28 Feb 2026 12:01:27 +0000 (15:01 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Sat, 28 Feb 2026 12:01:27 +0000 (15:01 +0300)
api1 and main app share namespace app\controllers, so SiteController
from the main app is accessible via api1. When GET / hits api1, Yii2
routes to SiteController::actionIndex() which calls render('index'),
but api1/views/site/index.php did not exist → ViewNotFoundException (500).

Added empty view file to stop the error. api1 is a REST API (FORMAT_JSON)
so the rendered empty string is JSON-encoded as "".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
erp24/api1/views/site/index.php [new file with mode: 0644]

diff --git a/erp24/api1/views/site/index.php b/erp24/api1/views/site/index.php
new file mode 100644 (file)
index 0000000..c305bf1
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+// api1 is a REST API — this view intentionally empty.
+// Response is formatted as JSON by the application.