This is my first work with Symfony 2. All I am trying to do here is whenever the user clicks on the submit button he will go to another page.
But my index page isn't loading. They are saying there is something wrong with my routing file, specifically:
A YAML file cannot contain tabs as indentation
I don't know what I have done wrong. Here is my routing file.
community_online_shop_homepage:
pattern: /
defaults: { _controller: CommunityOnlineShopBundle:Page:index }
_login:
pattern: /login
defaults: { _controller: CommunityOnlineShopBundle:Page:login}
IF you are using EditorConfig make sure to add this to your .editorconfig file
you can change indent_size to 2, depends on your preferences
A YAML file use spaces as indentation, you can use 2 or 4 spaces for indentation, but no tab. In other words, tab indentation is forbidden:
(source: YAML FAQ (thanks to Destiny Architect for the link))
For example, the Symfony configuration file can be written with 2 or 4 spaces as indentation:
4 spaces
2 spaces
Can you try
cache:clear
or try usingpath
instead ofpattern
.The
path
option is new in Symfony2.2,pattern
is used in older versions.A YAML file cannot contain tabs as indentation, so the mistake is here:
C:\\xampp\\htdocs\\api\\app/../src/AppBundle/Resources/config/valida tor.yml" at line 9 (near " - { resource: validators/services.yml }")
.