-
Notifications
You must be signed in to change notification settings - Fork 379
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
Wrong Environment loaded by Liip (Always Prod) #738
Comments
Up ! :3 |
As far as I know LiipimageBundle doesn't load any config files on it's own. Configuration is managed by Symfony. Are you 100% sure that this is only a problem with LiipImagineBundle? |
Hi BartVB ! And thx for your reply. Yes as far as I tested my application in 3 environments (dev / prerprod / prod), the problem only occurs with LiipImagineBundle, and in both dev and preprod environments. Here are more details : I have a multilingual website, and I use a bundle who need to define the different domain names of my different languages (mysite.fr, mysite.es, etc...), and this lines are in parameters_dev.yml / parameters_preprod.yml / parameters.yml. Those files are loaded in config_dev.yml / condif_preprod.yml / config_prod.yml. So in dev, I try to call the url "http://www.dev-mysite.com/media/myimages/cache/resolve/....", the resolution is launched on the prod environment (with a different domain name) : "http://www.mysite.com/media/myimages/cache/resolve/....". That's why I think the bundle launch on it's own at least the app.php instead of my app_dev.php, or it loads on it's own the config_prod.yml Do you need more explenations ? Thanks for your reply again ! |
Trying to figure out what the problem is here. Or does the output of your application contain http://www.mysite.com where this should be http://www.dev-mysite.com ? |
Yes that's it :
Here are more informations about my application :
|
I know it's a little tricky ^^ |
How do you generate those URLs? Are you using asset() with imagine_filter() to do this? |
yep |
here is an example how I use it (I didn't metioned it but I also use VichUploader) :
|
and I dumped the result of Also I dumped the url with imgine_filter() and it stills a dev url. That's why I thnik it comes from the cache resolution :/ |
The CacheResolvers aren't that complex, they should be fairly easy to debug? Everything highly depends on your exact implementation/configuration. The most obvious place to check is the value of |
okay thanks, I'll debug this resolver to see where it implements my prod URL. I will give you a feed back |
Hey, Any updates on this? |
No sorry :/ I did not find any solution to my problem :/ Le 6 sept. 2016 23:45, "Alex Wilson" [email protected] a écrit :
|
Thanks! As @BartVB has said, this bundle doesn't load any configuration files by its own (That would defeat the purpose if being a Symfony Bundle!), nor does it make any assumptions about environment, so this sounds like a local issue specific to your configuration. The WebPathResolver uses a factory to provide the value of Would you mind editing this file, and inserting an |
Hi everyone !
I have a problem with the bundle in my "preprod" and my "dev" environments.
After debuging it seems the bundle always load my "prod" configuration.
Here is my configurations files structure :
--app
----config
------config.yml
------config_dev.yml
------config_preprod.yml
------config_prod.yml
------parameters.yml
------parameters_dev.yml
------parameters_preprod.yml
------parameters_prod.yml
Does the bundle automaticaly load the parameter file set in /composer.json ? That would explain my problem...
Thanks !
The text was updated successfully, but these errors were encountered: