-
Notifications
You must be signed in to change notification settings - Fork 128
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
Fixes #497 mainUrl didn't contain asset path #509
Conversation
@helios-ag and @UlrichHP when you have time can you check it? |
Hi @JohJohan, In my case the assets_path is not defined because the bundles folder is located directly in the public directory. Your solution seems to make it mandatory to have the bundles folder in another folder. |
Okay i can look into that thanks for the feedback. Maybe checking if the 'asset_path' is set might be enough to fix it. I will have a look. |
I see default value for 'asset_path' is 'assets'. If i understand you correctly you set it to 'null' value? |
I didn't have to. I left it commented like in the README - Basic configuration I think the assets_path option never really worked... |
@helios-ag can you confirm the But i need it because in a project i have my bundle assets in a different folder there not in What i can do is: - $mainUrl = $package->getUrl('/bundles/fmelfinder/js');
+ $path = '/bundles/fmelfinder/js';
+ if ($this->params['assets_path'] !== 'assets') {
+ $path = '/'.$this->params['assets_path'].$path;
+ }
+ $mainUrl = $package->getUrl($path); So that it wont break it @helios-ag what do you think? Right now like i said it wont work for my project and i pin it to |
@JohJohan |
Yeah that is possible but it feels wrong to skip the config parameter, but using it for the default will break it @helios-ag i'm curious what you think about it? |
@johanadivare seems like prefix not used anymore, in this case prefix can be also eliminated from controller too |
Okay yes, but how should i fix loading my assets then? Now with the current code it loads |
Is there a reason why it cannot be done without the leading slash?
And one more: Thanks for clarifying |
@Smanst3r First off sorry for late reply!
Your right that isn't necessary and i removed it.
In my project i run: Then i have the following config: fm_elfinder:
assets_path: '/cdn' So no the docroot is different than assets_path right? |
Add missing asset path for main_url to correctly load the assets.
Fixes #497