FriendsOfSymfony/FOSUserBundle — Issue #562: Unrecognized field: usernameCanonical
Author: fracasula
Created: 2012-03-08 10:28:31+00:00
State: open

Hello,
i receive this error when a try to use the login form.
Before the "bin/vendors update" was all right.
Now i'm using Symfony 2.0.11 and FOSUserBundle 1.2.0
The "auto_mapping: true" setting is disabled because i'm using multiple entity managers...

Here's my app/**frontend**/config/config.yml file (note that there is an additional subfolder):

imports:
- { resource: parameters.ini }
- { resource: security.yml }

framework:
esi: { enabled: true }
translator: { fallback: en }
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: ~
less:
node: /usr/local/bin/node
node_paths: [/usr/local/lib/node, /usr/local/lib/node_modules]
yui_css:
jar: %kernel.root_dir%/java/yuicompressor-2.4.7.jar
yui_js:
jar: %kernel.root_dir%/java/yuicompressor-2.4.7.jar

# Doctrine Configuration
doctrine:
dbal:
default_connection: italy
connections:
italy:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name_italy%
user: %database_user%
password: %database_password%
charset: UTF8
world:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name_world%
user: %database_user%
password: %database_password%
charset: UTF8

orm:
auto_generate_proxy_classes: %kernel.debug%
default_entity_manager: italy
entity_managers:
italy:
connection: italy
mappings:
MobMindsCoreBundle: ~
FOSUserBundle: ~
metadata_cache_driver: apc
query_cache_driver: apc
result_cache_driver:
type: memcache
host: %memcache_host%
port: %memcache_port%
instance_class: Memcache
class: Doctrine\Common\Cache\MemcacheCache
world:
connection: world
mappings:
MobMindsCoreBundle: ~
FOSUserBundle: ~
metadata_cache_driver: apc
query_cache_driver: apc
result_cache_driver:
type: memcache
host: %memcache_host%
port: %memcache_port%
instance_class: Memcache
class: Doctrine\Common\Cache\MemcacheCache

# 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

fos_user:
db_driver: orm
firewall_name: main
user_class: MobMinds\CoreBundle\Entity\User
registration:
confirmation: { enabled: true }
from_email:
address: no-reply@%domain%
sender_name: %site_name% Staff
resetting:
token_ttl: %reset_password_ttl%

security.yml

security:
providers:
fos_userbundle:
id: fos_user.user_manager

encoders:
FOS\UserBundle\Model\UserInterface:
algorithm: sha512
encode_as_base64: false
iterations: 1

firewalls:
main:
pattern: ^/
form_login:
provider: fos_userbundle
csrf_provider: form.csrf_provider
logout: true
anonymous: true
remember_me:
key: %remember_me_secret%
lifetime: %remember_me_lifetime%
path: /
domain: %remember_me_domain%
always_remember_me: false

dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

access_control:
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
- { path: ^/_internal, ip: 127.0.0.1 }
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/, role: ROLE_ADMIN }

role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

MobMinds\CoreBundle\Entity\User: