Skip to content
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

imagine_filter ignores framework.assets.base_urls #57

Open
stefandoorn opened this issue Jan 4, 2018 · 0 comments
Open

imagine_filter ignores framework.assets.base_urls #57

stefandoorn opened this issue Jan 4, 2018 · 0 comments

Comments

@stefandoorn
Copy link
Contributor

Q A
Bug report? yes
Feature request? yes
BC Break report? no
RFC? yes
Sylius version 1.0.7

After making sure framework.assets.base_urls is used in the ThemeBundle, I found out today that the imagine_filter is still generating URL's based on the app's base URL, and not on the defined asset URL. This is something ImagineBundle itself also doesn't support, so it's not strictly a Sylius bug. Though, it prevents full usage of a CDN inside Sylius out of the box.

I didn't get a working solution yet to decorate the WebPathResolver of ImagineBundle. While trying to decorate I wanted to use the UrlPackage of the theme, but due to being an abstract service I couldn't inject that one in the decorator. Another issue is that the setting of the web_path resolver are resolved and injected again in a compiler pass of ImagineBundle, making it harder to get their values in the decorator class. Anyway, not that easy to get an easy fix for this.

Another option is to define a custom resolver for Sylius, which does the work. Still having issues with certain configurations, but it allows for more customisation and own injection points.

@pamil pamil transferred this issue from Sylius/Sylius May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant