diff --git a/core/components/minishop3/controllers/mgr/help.class.php b/core/components/minishop3/controllers/mgr/help.class.php index 053270d31..9424913a5 100644 --- a/core/components/minishop3/controllers/mgr/help.class.php +++ b/core/components/minishop3/controllers/mgr/help.class.php @@ -27,17 +27,12 @@ public function getLanguageTopics() */ public function loadCustomCssJs() { - // Vue CSS + // Config before Vue modules so mount sees ms3.config (#553). + $this->addVueConfig($this->ms3->config); + $this->addCss($this->ms3->config['assetsUrl'] . 'css/mgr/vue-dist/primeicons.min.css'); $this->addCss($this->ms3->config['assetsUrl'] . 'css/mgr/vue-dist/help.min.css'); - - // Vue module $this->addVueModule($this->ms3->config['jsUrl'] . 'mgr/vue-dist/help.min.js'); - - // Pass config to JavaScript - $this->addHtml(''); } /** diff --git a/core/components/minishop3/tests/HelpVueEntryTest.php b/core/components/minishop3/tests/HelpVueEntryTest.php new file mode 100644 index 000000000..fee417b8d --- /dev/null +++ b/core/components/minishop3/tests/HelpVueEntryTest.php @@ -0,0 +1,54 @@ + $modulePos) { + $fail('help controller must call addVueConfig() before addVueModule()'); +} + +$entry = $repoRoot . '/vueManager/src/entries/help.js'; +$entrySrc = is_file($entry) ? file_get_contents($entry) : false; +if ($entrySrc === false || !str_contains($entrySrc, '#ms3-vue-help')) { + $fail('help entry must mount #ms3-vue-help'); +} + +fwrite(STDOUT, "OK HelpVueEntryTest\n"); +exit(0);