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

Cannot disable asset combination in debug mode #429

Open
mcaquet opened this issue May 22, 2013 · 7 comments
Open

Cannot disable asset combination in debug mode #429

mcaquet opened this issue May 22, 2013 · 7 comments

Comments

@mcaquet
Copy link

mcaquet commented May 22, 2013

Hello,

I would like to disable asset combination when I am debugging.

I have tried setting "combine=false" in my assetic call. But when using firebug, I still see the css coming from a combined css file.

Is there a way to completely disable asset combination from the assetic configuration section in the config_dev file ?

@stof
Copy link
Collaborator

stof commented May 22, 2013

In debug mode, the default behavior is to send assets separately. Can you show your assetic call and the generated HTML ?

@mcaquet
Copy link
Author

mcaquet commented May 22, 2013

Sure. Here is my assetic call:

{% stylesheets filter='lessphp,cssrewrite'
     '@DevoptionBaseBundle/Resources/less/front.less'
     '@DevoptionBaseBundle/Resources/less/back.less'
'@DevoptionBaseBundle/Resources/public/css/custom-theme/jquery-ui-1.10.0.custom.css'
'@DevoptionBaseBundle/Resources/public/css/jquery.mCustomScrollbar.css'
     output='css/style4.css'
     %}
     <link href="{{ asset_url }}" type="text/css" rel="stylesheet" />

... and the html generated:

<link  href="/css/style4.css  <view-source:http://www.departgolf.com/css/style4.css>"type="text/css"rel="stylesheet"/>

And here is config.yml:

assetic:
     debug:          false #"%kernel.debug%"
     use_controller: false
     #bundles:        [ ]
     #java: /usr/bin/java
     filters:
         cssrewrite: ~
         cssembed:
             jar: %kernel.root_dir%/Resources/java/cssembed-0.4.5.jar
         lessphp:
             file: %kernel.root_dir%/../vendor/lessphp/lessc.inc.php
             apply_to: "\.less$"

And in config_dev.yml:

assetic:
     use_controller: true

Mathias

@mcaquet mcaquet closed this as completed May 22, 2013
@mcaquet mcaquet reopened this May 22, 2013
@stof
Copy link
Collaborator

stof commented May 22, 2013

the issue is simple: you are not in debug mode as you are forcing it to false

@mcaquet
Copy link
Author

mcaquet commented May 22, 2013

Indeed... but when I add the following line to my config_dev.yml file:

debug: true

the asset files are still combined. Is there anything else wrong in my assetic config ?

@dominikzogg
Copy link
Contributor

@stof it seems, i got the same problem, the factory returns true $factory->isDebug(), but i get only 1 output file. Its called like output='....' or choice a name for combine if i remove it. The template render the urls splitted (as it should be)

@dominikzogg
Copy link
Contributor

@dominikzogg
Copy link
Contributor

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

3 participants