Skip to content

Can't get it working in Symfony 3.2.4 #101

@stefandoorn

Description

@stefandoorn

I haven't tested in other versions of Symfony yet, but I have the impression things are not properly working.

app/config/routing.yml

bundle_frontend:
    resource: "@ExampleBundle/Resources/config/routing/frontend.yml"
    type: be_simple_i18n

@ExampleBundle/Resources/config/routing/frontend.yml

bundle_frontend_index:
    path: /
    methods: [GET]
    locales: { en: "/welcome", fr: "/bienvenue", de: "/willkommen", nl: "/test" }
    defaults:
        _controller: bundle_frontend.index_controller:indexAction

Looking at bin/console debug:router the path stays / all the time, and none of the URL's are accessible. Removing the 'path' configuration above doesn't change a thing.

Using prefixes on the first configuration actually leads to an error thrown by the default Routing module of Symfony saying that prefix cannot be an array:

  [Symfony\Component\Config\Exception\FileLoaderLoadException]                                                                                                                    
  Warning: trim() expects parameter 1 to be string, array given in /var/www/path/app/config/routing.yml (which is being imported from "/var/www/path/app/config/routing_de  
  v.yml").                                                                                                                                                                        

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions