Page 1 of 1

[closed] design export: several problems / error messages

Posted: Sun May 24, 2015 10:12 pm
by Franck
When trying to export simplex, here is the error displayed:
An error occurred parsing the stylesheets, and/or templates of the design. The url '[[$font]]/simplex.eot' could not be located as a physical file. This probably indicates that the template and/or stylesheets of this theme are using advanced logic that the design manager cannot process.
No error for other default designs.

The same kind of error message appears when exporting a home made design with webfonts included in CSS. DataURI background image in CSS generates also the same message.

In a more general way, all urls calling images or fonts including ' or " in CSS will generate this error message.
If I remove all apostrophes, I have another laconic message (in french even if I switch prefered language to english): "Aucune données trouvées pour " meaning "no data found for"

Tested on rev9983.

Re: design export: several problems / error messages

Posted: Sun May 24, 2015 11:49 pm
by calguy1000
The problem is not the eot file but the smarty variables in the URL [[$font]]. We cannot (and don't pass the stylesheets or templates through smarty before exporting the data) because a parsed html/css output may be different given a number of circumstances.

We already diagnosed this, which is why there is a much more verbose than it was during the first and second betas.

Re: design export: several problems / error messages

Posted: Sun May 31, 2015 2:09 pm
by Franck
OK, I see for the smarty problem.

But, how is it possible to export a design, then? Apart from temporarily remove all smarty calls in stylesheets?

Re: design export: several problems / error messages

Posted: Sun May 31, 2015 3:30 pm
by calguy1000
Well, your designs for sharing will have to be simpler.

This does not mean you cannot use smarty logic in your templates, or even your stylesheets.

What it does mean is that when specifying resources in templates and stylesheets you will not be able to use smarty variables or plugins. (relative URLS are okay) The design manager needs to be able to parse the stylesheets/templates and find the images, fonts, sprites, sub-templates, etc. without relying on smarty.

so:
#some_id {
background: url(some/relative/url/something.gif) /* okay for exporting */
}
#other_id {
background: url({root_url}/uploads/images/something.gif) /* not okay for exporting */
}

{Navigator template='foobar'} {* okay for exporting *}
{Navigator template=$somevariable} {* not okay for exporting *}

Re: design export: several problems / error messages

Posted: Sun May 31, 2015 4:39 pm
by Franck
OK, it's more clear for me, thank you.