From 6e39e24f42c67d9160994e00b8eab2b04e7d3490 Mon Sep 17 00:00:00 2001 From: Vova Yatsyuk Date: Thu, 20 Aug 2026 16:59:22 +0300 Subject: [PATCH] Check theme source files in Virtual Theme Check (#19) Making a virtual theme physical while its source files are unavailable is what breaks the storefront with "Required parameter 'theme_dir' was not passed", so the check now reports the state of the files and the fixer refuses to touch the themes it cannot read. - Virtual Theme Check gets Path and Status columns - Status names the files Magento can't read. Unreadable file is never reported as a removed one - a failed stat cannot tell them apart - Fix All opens up the permissions of unreadable source files and skips the themes that are still unreadable, listing them in the response - Readability check extracted into Swissup\Core\Model\Theme\SourceFiles, shared by the block and the controller - Config table styles shared between Modules and Virtual Theme Check Co-Authored-By: Claude Opus 5 --- .../Config/Form/Field/FixVirtualThemes.php | 2 +- .../Config/Form/Field/VirtualCheck.php | 57 +++++++++-- .../Adminhtml/Theme/FixVirtualThemes.php | 51 +++++++++- Model/Theme/SourceFiles.php | 96 +++++++++++++++++++ .../templates/config/field/modules.phtml | 4 +- .../config/field/virtual_check.phtml | 40 ++++---- .../web/css/system-config/modules.less | 8 +- view/adminhtml/web/js/virtualfix.js | 41 +++++--- 8 files changed, 252 insertions(+), 47 deletions(-) create mode 100644 Model/Theme/SourceFiles.php diff --git a/Block/Adminhtml/Config/Form/Field/FixVirtualThemes.php b/Block/Adminhtml/Config/Form/Field/FixVirtualThemes.php index eb11886..e5435cb 100644 --- a/Block/Adminhtml/Config/Form/Field/FixVirtualThemes.php +++ b/Block/Adminhtml/Config/Form/Field/FixVirtualThemes.php @@ -13,7 +13,7 @@ public function render(AbstractElement $element) return << -
+