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

Issue with CSS resolver #213

Open
priand opened this issue Nov 5, 2014 · 5 comments
Open

Issue with CSS resolver #213

priand opened this issue Nov 5, 2014 · 5 comments
Assignees
Labels
Milestone

Comments

@priand
Copy link

priand commented Nov 5, 2014

Hi,
I created my own UriLocator that is serving the files from the same server, but different application. For that I'm using a custom protocol like "localserver://fake/path/to/the/resource.css". But unfortunately, this is not recognized as a URL by the CSS processor and it is failing by throwing a WroRuntimeException in
ro.isdc.wro.model.resource.processor.support.ImageUrlRewriter.rewrite(String, String)
This method just knows a set of uri locators instead of trying to delegate to every single registered one. So it fails because mine is part of the hard code list.
This is actually a blocker. Do you have any solution to overcome it?

@priand
Copy link
Author

priand commented Nov 6, 2014

Actually, I fixed my own problem by using a Transformer. But I think that the CSS rewriter should delegate to the UriLocator.

@alexo alexo self-assigned this Nov 6, 2014
@alexo alexo added the bug label Nov 6, 2014
@alexo alexo added this to the 1.7.8 milestone Nov 6, 2014
@alexo
Copy link
Owner

alexo commented Nov 6, 2014

@priand just curious, why creating new uriLocator instead reusing existing one (ex: urlUriLocator)?

@priand
Copy link
Author

priand commented Nov 6, 2014

Because the existing urlUriLocator requires a whole url, including the server path. In my case, I want to implicitly use the current server, where a war containing the resources is deployed. Ok, now I'm using a transformer which replaces the partial url by a whole one.
But I'm also working on other locator, like a 'dojo' one, where you specify the list of dojo modules in a form like:
dojo:dojo/lang,dojo/base

@alexo
Copy link
Owner

alexo commented Nov 6, 2014

If you find useful custom locators, I would appreciate if you would share your implementation ;)

@priand
Copy link
Author

priand commented Nov 6, 2014

yes, this is the intent. I'm experimenting with them right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants