3

i dont get it - i already have setted up a few symfony projects but now i am totally lost with the error message:

contains an error: There is no "cssrewrite" filter.

composer:

"require": {
    "php": ">=5.5.9",
    "symfony/symfony": "3.1.*",
    "symfony/monolog-bundle": "^2.8",
    "symfony/polyfill-apcu": "^1.0",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "incenteev/composer-parameter-handler": "^2.0",
    "ircmaxell/password-compat": "^1.0",
    "nelsonkopliku/twig-exception": "0.*",
    "predis/predis": "^1.1",
    "symfony/assetic-bundle": "2.8"
},

app/config/config.yml

assetic:
  debug:          "%kernel.debug%"
  use_controller: false
  bundles:        [ 'oneBundle', 'anotherBundle' ]
  #java: /usr/bin/java
  filters:
    uglifyjs:
      bin: /usr/local/bin/uglifyjs
    uglifycss:
      bin: /usr/local/bin/uglifycss
    less:
      node: "/usr/local/bin/node"
      node_paths: [/usr/local/lib/node_modules/]
    cssrewrite: ~

in the template:

{% stylesheets
    'assets/vendor/bootstrap/dist/css/bootstrap.css'
    'assets/vendor/font-awesome/css/font-awesome.css'
  filter="cssrewrite,?uglifycss" %}
    <link href="{{ asset_url }}" rel="stylesheet" />
{% endstylesheets %}

if i remove the cssrewrite the uglifycss filter works. also as a cross-check - i removed the uglifycss from config, and then it complains about the missing filter.

any ideas on how i can fix this ?

Helmut Januschka
  • 1,578
  • 3
  • 16
  • 34
  • maybe it should be `cssrewrite` not `cssrewritea` ? – pavlovich Aug 18 '16 at 13:13
  • 1
    The error message is basically saying there's a config key in the config.yml file that isn't defined in the bundle DependencyInjection classes. The message mentions `cssrewritea`, whereas the config.yml file you've posted configured a `cssrewrite` key. Looks like a simple typo to me – Elias Van Ootegem Aug 18 '16 at 13:16
  • 1
    sorry guys the `a` was from a test run - i had the wrong log line in pastbuffer. – Helmut Januschka Aug 18 '16 at 13:38

0 Answers0