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

Error with v1.6.3 and CSS data URLs #105

Closed
redking opened this issue Mar 20, 2013 · 7 comments
Closed

Error with v1.6.3 and CSS data URLs #105

redking opened this issue Mar 20, 2013 · 7 comments
Assignees
Milestone

Comments

@redking
Copy link

redking commented Mar 20, 2013

Hey,

Since upgrading to v1.6.3, less files that contain base64 encoded data uris are no longer processed.

For example, if I add a file with the following content to a wro package, the compilation will fail

.test {
background:url(data:image/gif;base64,R0lGODlhBQALAIAAAP7//6a9zyH5BAkAAAAALAAAAAAFAAsAAAILDBx4mrfeEJuQogIAOw==) no-repeat 50% 50%;
}

The exception outputted to the console is

ERROR ro.isdc.wro.model.resource.processor.decorator.ExceptionHandlingProcessorDecorator-process:65 - Failed to process the resource: ro.isdc.wro.model.resource.Resource@17a22c0[CSS,app-dashboard,true] using processor: ro.isdc.wro.extensions.processor.css.LessCssProcessor@1710dc0. Reason: Error in LESS: SyntaxError: expected ')' got '''

(the character after 'got' depends on the file that has provoked the exception)

The package is successfully built when this file is removed, or when v1.6.2 is used.

I've tried quoting the url content and putting it in a variable but it doesn't help, and I can find nothing in the lessc docs or issues on github that suggests there has been a change in syntax.

Any ideas ?

The compilation is using the Node processor, and I have lessc 1.3.3 installed.

@alexo
Copy link
Owner

alexo commented Mar 20, 2013

The processor fails only if the underlying less compiler fails. I'll check just to be sure if the lessc is the problem.
In the meantime, you can either switch to rhinoLessCss or less4j processors.

@redking
Copy link
Author

redking commented Mar 20, 2013

The same lessc compiler is used whether I use wro 1.6.2 or 1.6.3 though, is that right ? So why would less compilation fail in one version and not in the other ? The only change I made between tests is to update wro4j (leaving node lessc and the less source file untouched).

Thanks for taking a look at this though! Unfortunately I can't use the other processors, as developers here need the speed of the Node processor. I was hoping to benefit from the improved less logging in 1.6.3, but I can revert to the previous version for the moment.

@alexo
Copy link
Owner

alexo commented Mar 20, 2013

The less4j processor is really fast. You could try it... also there is the stable 1.0.0 version available.

@alexo
Copy link
Owner

alexo commented Mar 20, 2013

And yes, you are right. As long as the same lessc version works with wro4j 1.6.2 and fails with 1.6.3, there is something wrong with wro4j. I'll investigate this.

Thanks for reporting.

@ghost ghost assigned alexo Mar 21, 2013
@alexo
Copy link
Owner

alexo commented Mar 25, 2013

@redking Could you provide the following details:

  • the list of configured processors
  • the minimum css content which cause the failure (I'm not sure that the provided css cause the failure - could not reproduce).

@redking
Copy link
Author

redking commented Mar 29, 2013

Hey,

The pre-processors are

cssVariables,cssImport,semicolonAppender

post-processors

lessCss

The CSS I posted above is the minimum to reproduce i.e. If I reduce a css file to only that line, it will not compile. If I replace the line with a simple CSS rule, it will compile.

@alexo
Copy link
Owner

alexo commented Apr 1, 2013

Fixed in branch 1.6.x

@alexo alexo closed this as completed Apr 1, 2013
This was referenced May 14, 2013
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

2 participants