Could not load type “filter” in SonataAdminBundle-Collection of common programming errors
I recently did a vendors/update and now my sonata admin is broken with the following error:
Symfony\Component\Form\Exception\FormException: Could not load type "filter" (uncaught exception) at /home/herman/WORK/bloomnet/sf/gaudeamus/vendor/symfony/src/Symfony/Component/Form/FormFactory.php line 383
Normal CRUD actions outside sonata admin works fine. Sonata dashboard also is OK. Problem is when i try display the list of articles or create a new one. While creating, error is a little bit different:
Could not load type "s4fd8521531280"
where type is a random string and comes from the same line (383) in FormFactory.php
Before appear the error , I installed IvoryCKEditorBundle, but when I disabled this bundle in Kernel, error was still there
My config files: routing.yml
articles:
resource: "@AcmeGaudeamusBundle/Controller/"
type: annotation
prefix: /
admin:
resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
prefix: /admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: /admin
config.yml
imports:
- { resource: parameters.ini }
- { resource: security.yml }
framework:
#esi: ~
#translator: { fallback: %locale% }
secret: %secret%
charset: UTF-8
router: { resource: "%kernel.root_dir%/config/routing.yml" }
form: true
csrf_protection: true
validation: { enable_annotations: true }
templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
session:
default_locale: %locale%
auto_start: true
# Twig Configuration
twig:
debug: %kernel.debug%
strict_variables: %kernel.debug%
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
# java: /usr/bin/java
filters:
cssrewrite: ~
# closure:
# jar: %kernel.root_dir%/java/compiler.jar
# yui_css:
# jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar
# Doctrine Configuration
doctrine:
dbal:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
user: %database_user%
password: %database_password%
charset: UTF8
orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
# Swiftmailer Configuration
swiftmailer:
transport: %mailer_transport%
host: %mailer_host%
username: %mailer_user%
password: %mailer_password%
jms_security_extra:
secure_controllers: true
secure_all_services: false
services:
admin.article:
class: Acme\GaudeamusBundle\Admin\ArticleAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: Articles, label: Articles }
arguments: [null, Acme\GaudeamusBundle\Entity\Article, SonataAdminBundle:CRUD]
admin.menu:
class: Acme\GaudeamusBundle\Admin\MenuAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: Menu, label: Menu }
arguments: [null, Acme\GaudeamusBundle\Entity\Menu, SonataAdminBundle:CRUD]
# app/config/config.yml
sonata_block:
default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
sonata.block.service.text:
sonata.block.service.action:
sonata.block.service.rss:
# Some specific block from the SonataMediaBundle
#sonata.media.block.media:
#sonata.media.block.gallery:
#sonata.media.block.feature_media:
security.yml:
security:
encoders:
Symfony\Component\Security\Core\User\User: plaintext
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
in_memory:
users:
user: { password: userpass, roles: [ 'ROLE_USER' ] }
admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
login:
pattern: ^/demo/secured/login$
security: false
secured_area:
pattern: ^/demo/secured/
form_login:
check_path: /demo/secured/login_check
login_path: /demo/secured/login
logout:
path: /demo/secured/logout
target: /demo/
#anonymous: ~
#http_basic:
# realm: "Secured Demo Area"
access_control:
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
#- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
ArticleAdmin.php
Originally posted 2013-11-27 12:10:13.