php - Using Symfony2 assetic results in 404 -
i can't seem assetic work me.
here assetic config in config.yml file
assetic:     debug:          "%kernel.debug%"     use_controller: false     bundles:        [ fosuserbundle, myuserbundle ]     filters:         cssrewrite: ~ i have created bundle extends fosuserbundle. i've overridden registration template , trying include own css.
// myuserbundle/resources/views/registration/register_content.html.twig  {% block stylesheets %}     {% stylesheets 'bundles/myuser/css/*' filter='cssrewrite' %}         <link rel="stylesheet" href="{{ asset_url }}" />     {% endstylesheets %} {% endblock %} my bundle has following structure:
/myuserbundle     ...     /resources          ...         /public             /css                 signup.css i 404 though.
http://myproject.dev/css/494d9ed_part_1_signin_1.css 404 not found.
i following exception thrown:
no route found "get /css/494d9ed_part_1_signin_1.css"
i've published assets lives in
/myproject     /web         /bundles             /myuser                 /css                     signin.csswhat doing wrong?
try syntax:
{% stylesheets filter='cssrewrite' '@myuserbundle/resources/public/css/*' %}     <link rel="stylesheet" type="text/css" href="{{ asset_url }}" /> {% endstylesheets %} and on command line:
php app/console cache:clear php app/console assets:install --symlink php app/console assetic:dump in dev environment should work without assetic:dump command.
Comments
Post a Comment