title: SonataFormatterBundle not working
body: <p>Been trying to get the creditor working on a Sonata Admin page, with no luck.</p>
  
  <p>Have followed the installation instructions and think i have everything covered:</p>
  
  <p>Composer.json</p>
  
  <pre><code>"require": {
      "php": "&gt;=5.3.3",
      "symfony/symfony": "~2.5",
      "doctrine/doctrine-bundle": "~1.2",
      "doctrine/data-fixtures": "~1.0",
      "doctrine/doctrine-cache-bundle": "~1.0",
      "twig/extensions": "~1.0",
      "symfony/assetic-bundle": "~2.3",
      "symfony/swiftmailer-bundle": "~2.3",
      "symfony/monolog-bundle": "~2.4",
      "symfony-cmf/symfony-cmf": "1.2.*",
      "symfony-cmf/simple-cms-bundle": "1.2.*",
      "symfony-cmf/create-bundle": "1.2.*",
      "jackalope/jackalope-jackrabbit": "1.1.*",
      "sonata-project/doctrine-phpcr-admin-bundle": "~1.2",
      "sonata-project/formatter-bundle": "2.3.*@dev",
      "sensio/distribution-bundle": "~3.0",
      "sensio/framework-extra-bundle": "~3.0",
      "incenteev/composer-parameter-handler": "~2.0",
      "nelmio/alice": "~1.0",
      "friendsofsymfony/jsrouting-bundle": "@stable"
  },
  </code></pre>
  
  <p>config.yml:</p>
  
  <pre><code># Twig Configuration
  twig:
    debug:            "%kernel.debug%"
    strict_variables: "%kernel.debug%"
    form:
      resources:
          - 'SonataFormatterBundle:Form:formatter.html.twig'
  sonata_block:
    default_contexts: [cms]
    blocks:
      # Enable the SonataAdminBundle block
      sonata.admin.block.admin_list:
          contexts: [admin]
      sonata.block.service.text:
      sonata.page.block.children_pages:
      sonata.formatter.block.formatter:
  
  sonata_formatter:
    formatters:
      markdown:
          service: sonata.formatter.text.markdown
          extensions:
              - sonata.formatter.twig.control_flow
              - sonata.formatter.twig.gist
              #- sonata.media.formatter.twig
      text:
          service: sonata.formatter.text.text
          extensions:
              - sonata.formatter.twig.control_flow
              - sonata.formatter.twig.gist
              #- sonata.media.formatter.twig
      rawhtml:
          service: sonata.formatter.text.raw
          extensions:
              - sonata.formatter.twig.control_flow
              - sonata.formatter.twig.gist
              #- sonata.media.formatter.twig
      richhtml:
          service: sonata.formatter.text.raw
          extensions:
              - sonata.formatter.twig.control_flow
              - sonata.formatter.twig.gist
              #- sonata.media.formatter.twig
      twig:
          service: sonata.formatter.text.twigengine
          extensions: [] # Twig formatter cannot have extensions
    ckeditor:
      templates:
          browser: 'SonataFormatterBundle:Ckeditor:browser.html.twig'
          upload: 'SonataFormatterBundle:Ckeditor:upload.html.twig'            
  
  sonata_admin:
    templates:
      # default global templates
      layout:  SonataAdminBundle::layout.html.twig 
  </code></pre>
  
  <p>app/Resources/SonataAdminBundle/views/layout.html.twig</p>
  
  <pre><code>{% extends 'SonataAdminBundle::standard_layout.html.twig' %}
  
  {% block stylesheets %}
  {{ parent() }}
  &lt;link rel="stylesheet" href="{{ asset('bundles/sonataformatter/markitup/skins/sonata/style.css') }}" type="text/css" media="all" /&gt;
  &lt;link rel="stylesheet" href="{{ asset('bundles/sonataformatter/markitup/sets/markdown/style.css') }}" type="text/css" media="all" /&gt;
  &lt;link rel="stylesheet" href="{{ asset('bundles/sonataformatter/markitup/sets/html/style.css') }}" type="text/css" media="all" /&gt;
  &lt;link rel="stylesheet" href="{{ asset('bundles/sonataformatter/markitup/sets/textile/style.css') }}" type="text/css" media="all" /&gt;
  {% endblock %}
  
  {% block javascripts %}
  {{ parent() }}
  &lt;script src="{{ asset('bundles/ivoryckeditor/ckeditor.js') }}" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('bundles/sonataformatter/vendor/markitup-markitup/markitup/jquery.markitup.js') }}" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('bundles/sonataformatter/markitup/sets/markdown/set.js') }}" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('bundles/sonataformatter/markitup/sets/html/set.js') }}" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="{{ asset('bundles/sonataformatter/markitup/sets/textile/set.js') }}" type="text/javascript"&gt;&lt;/script&gt;
  {% endblock %}
  </code></pre>
  
  <p>And finally the Admin class:</p>
  
  <pre><code>protected function configureFormFields(FormMapper $formMapper)
  {
      $formMapper
          -&gt;add('name', 'text', array())
          -&gt;add('description', 'sonata_formatter_type', array(
              'source_field'         =&gt; 'description',
              'source_field_options' =&gt; array('attr' =&gt; array('class' =&gt; 'span10', 'rows' =&gt; 20)),
              'format_field'         =&gt; 'description',
              'target_field'         =&gt; 'description',
              'event_dispatcher'     =&gt; $formMapper-&gt;getFormBuilder()-&gt;getEventDispatcher()
          ))
      ;
  }
  </code></pre>
  
  <p>My admin page and form load correctly but i'm left with a normal (but larger) text area, no exception is thrown, no js error, and the js/css files seem to be loaded correctly so must be a configuration issue.... any ideas?</p>