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

Exception when loading webjar resources with leading slash #690

Open
reckart opened this issue Aug 2, 2017 · 0 comments
Open

Exception when loading webjar resources with leading slash #690

reckart opened this issue Aug 2, 2017 · 0 comments

Comments

@reckart
Copy link
Contributor

reckart commented Aug 2, 2017

When trying to load the css/google-bootstrap.less that ships in Wicket Bootstrap via a LessResourceReference, e.g.

IBootstrapSettings settings = Bootstrap.getSettings(this);
settings.setCssResourceReference(new LessResourceReference(GoogleCssReference.class, "css/google-bootstrap.less"));

this exception is triggered:

WebJarAssetLocator$ResourceException: /webjars//bootstrap/null/less/mixins.less could not be found. Make sure you've added the corresponding WebJar and please check for typos.

The reason appears to be the leading slash here:

@import "webjars!/bootstrap/current/less/mixins.less

This causes the recent-version substitution to fail because at some point it causes the slash to be doubled and /webjars//bootstrap/curent/less/mixins.less cannot be found in the asset map.

Either the doubling of the slash should be avoided or an exception should be thrown that leading slashes are not supported at all.

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