1

Begineer to Symfony, On my first app i used FOS User Bundle for login and registration. and also override it's templetes in app/Resources directory. It was working well. Then I integrate Sonata User admin Bundle using this tutorial.

Now when I go to this url http://127.0.0.1:8000/login it says Warning: filemtime(): stat failed for /var/www/html/first_app/app/Resources/SonataUserBundle/views/Security/login.html.twig but on my Resources directory i have FOSUserBundle directory that contains overridden templates.

Plus on router debug i have these url.

 sonata_user_admin_security_login         ANY      ANY    ANY  /admin/login                                       
 sonata_user_admin_security_check         ANY      ANY    ANY  /admin/login_check                                 
 sonata_user_admin_security_logout        ANY      ANY    ANY  /admin/logout                                      
 sonata_admin_redirect                    ANY      ANY    ANY  /admin/                                            
 sonata_admin_dashboard                   ANY      ANY    ANY  /admin/dashboard                                   
 sonata_admin_retrieve_form_element       ANY      ANY    ANY  /admin/core/get-form-field-element                 
 sonata_admin_append_form_element         ANY      ANY    ANY  /admin/core/append-form-field-element              
 sonata_admin_short_object_information    ANY      ANY    ANY  /admin/core/get-short-object-description.{_format} 
 sonata_admin_set_object_field_value      ANY      ANY    ANY  /admin/core/set-object-field-value                 
 sonata_admin_search                      ANY      ANY    ANY  /admin/search                                      
 sonata_admin_retrieve_autocomplete_items ANY      ANY    ANY  /admin/core/get-autocomplete-items 
 fos_user_security_login                  ANY      ANY    ANY  /login                                             
 fos_user_security_check                  POST     ANY    ANY  /login_check                                       
 fos_user_security_logout                 ANY      ANY    ANY  /logout                                            
 fos_user_profile_show                    GET      ANY    ANY  /profile/                                          
 fos_user_profile_edit                    ANY      ANY    ANY  /profile/edit                                      
 fos_user_registration_register           ANY      ANY    ANY  /register/                                         
 fos_user_registration_check_email        GET      ANY    ANY  /register/check-email                              
 fos_user_registration_confirm            GET      ANY    ANY  /register/confirm/{token}                          
 fos_user_registration_confirmed          GET      ANY    ANY  /register/confirmed                                
 fos_user_resetting_request               GET      ANY    ANY  /resetting/request                                 
 fos_user_resetting_send_email            POST     ANY    ANY  /resetting/send-email                              
 fos_user_resetting_check_email           GET      ANY    ANY  /resetting/check-email                             
 fos_user_resetting_reset                 GET|POST ANY    ANY  /resetting/reset/{token}                           
 fos_user_change_password                 GET|POST ANY    ANY  /change-password/change-password  



fos_user_security:
    resource: "@FOSUserBundle/Resources/config/routing/security.xml"

fos_user_profile:
    resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
    prefix: /profile

fos_user_register:
    resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
    prefix: /register

fos_user_resetting:
    resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
    prefix: /resetting

fos_user_change_password:
    resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
    prefix: /change-password

sonata_user:
    resource: "@SonataUserBundle/Resources/config/routing/admin_security.xml"
    prefix: /admin

admin:
    resource: "@SonataAdminBundle/Resources/config/routing/sonata_admin.xml"
    prefix: /admin

_sonata_admin:
    resource: .
    type: sonata_admin
    prefix: /admin

It should use FOS templates instead of Sonatauser templates, Confused, don't understand what just happened.

Muhammad Taqi
  • 5,356
  • 7
  • 36
  • 61

0 Answers0