I'm trying to override a third party bundle's layout template with the layout of my bundle, by including the new layout in the app/Resources/ directory as indicated in the Symfony2 book section; however, I'm getting the following exception:
"...path_to_my_app/app/Resources/FOSUserBundle/views/layout.html.twig" resource is hidden by a resource from the "MyVendorMyBundle" derived bundle. Create a "...path_to_my_app/app/Resources/MyVendorMyBundle/views/layout.html.twig" file to override the bundle resource.
In particular, I would like to overwrite the FOSUserBundle layout with that in my bundle. I followed the steps shown in the bundle's documentation, which are no different than those in the Symfony book.
What could be the cause of this exception? and how can I make it work?
I tried putting my bundle's layout in the app/Resources/MyVendorMyBundle/views/ as indicated in the above exception message, but if I do that, only the layout of MyBundle is read and returned and not the templates for the FOSUserBundle that extend it.