-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLPI 11 : 404 error with ...-vue.js #17533
Comments
ping @cconard96 |
As far as I remember, in the |
Indeed, it work only if the current path has a precise count of directories (e.g. it could work for I tried to use a direct import instead of using the diff --git a/js/src/vue/app.js b/js/src/vue/app.js
index 6cadc3c5b9..c074724a08 100644
--- a/js/src/vue/app.js
+++ b/js/src/vue/app.js
@@ -72,8 +72,11 @@ const components = {};
component_context.keys().forEach((f) => {
// Ex: ./Debug/Toolbar.vue => DebugToolbar
const component_name = f.replace(/^\.\/(.+)\.vue$/, '$1');
+ const path = CFG_GLPI.root_doc + '/public/build/vue/vue-sfc/' + component_name.replace('/', '-') + '-vue.js';
components[component_name] = {
- component: vue.defineAsyncComponent(() => component_context(f)),
+ component: vue.defineAsyncComponent(
+ () => import(/* webpackIgnore: true */path)
+ ),
};
});
// Save components in global scope The I also tried to use an <script type="importmap">
{
"imports": {
"/public/build/vue/vue-sfc/FuzzySearch-Modal-vue.js": "{{ config('root_doc') }}/public/build/vue/vue-sfc/FuzzySearch-Modal-vue.js"
}
}
</script> Another solution could be to use a @cconard96 Could you take a look on it? It is really important as it make GLPI unusable when it is not located at the web server root path, for instance when the path is defined by an |
Using |
Fixed in #17537. |
Code of Conduct
Is there an existing issue for this?
Version
11
Bug description
On my development workstation, I have several instances of GLPI installed in subfolders.
For GLPI MAIN, the URL is
http://localhost/GLPI/main
, the page is displayed, but it can't find thevue.js
elements, as it tries to openhttp://localhost/public/build/vue//vue-sfc/FuzzySearch-Modal-vue.js
Relevant log output
No response
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
GLPI information
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
No response
The text was updated successfully, but these errors were encountered: