-
Notifications
You must be signed in to change notification settings - Fork 130
[bug] asset can not load from relative path #142
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
Comments
Hello!! I had the same problem... Elfinder was not loading at all and there were a lot of '404 Cannot load resource...' in the browser console. For example "mysite.localhost". So, the link given to elfinder would be http://mysite.localhost/app_dev.php/elfinder (dev environment) Hope this helps |
You need to set the variable "assets_path" in your elfinder config:
|
Hi, I am using this bundle in order to load images from a server but I have the same problems when I try to load assets. Are there some config to set the correct route without setting manually with 'assets_path' key? Thanks. |
The default behaviour for bundle is a project with configured vhost, and configured composer.json with following settings: {
"config": {
"component-dir": "web/assets"
}
} So assets placed under web/assets folder. But if you move assets somewhere else manually, you should set assets_path. |
Thank you @helios-ag for your clarification but I haven't moved my assets. The only thing is that my configured vhost has an alias in order to define symfony project as a specific path as you can see at bottom: This configuration is used in order to have routes in a different symfony projects because of each one will be placed at different web server. So in this case, I don't know if it would be possible that bundle getting the symfony root path to define where is the "/" page and knowing the assets path. |
Well, in this case, do you have elfinder assets under vendor dir? The 'component' should copy them from vendor dir to web/assets directory, according to component - dir option. |
Yes, I have elfinder assets directory defined as you said previously. The possible solution could be to change component-dir value through command-line (because depending on the environment I need a value or another one). However, this solution causes the Thanks for your responses. |
There is also option to use version 4 of the bundle, which contains assets 'internally'. |
Perfect, currently I was using version 5.1. |
@gittix09 can't find any "domain" option in this bundle's configs. |
my project is in subdirectory of web root,
/var/www/test/a/symfony_root_project/web
when i open
http://localhost/test/a/symfony_root_project/web/elfinder
, i see that bundle try load asset from/assets/jquery/jquery.js
and no from/test/a/symfony_root_project/web/assets/jquery/jquery.js
The text was updated successfully, but these errors were encountered: