8000 Error parsing 'templates' property in routing.yml for new Resource · Issue #157 · Sylius/SyliusResourceBundle · GitHub
[go: up one dir, main page]

Skip to content
Error parsing 'templates' property in routing.yml for new Resource #157
@nicanaca0

Description

@nicanaca0

This is roughly what I've been following and this specific section is what I was comparing my routing.yml to - http://docs.sylius.org/en/latest/bundles/SyliusResourceBundle/routing.html#using-custom-templates

The line templates: AppTeamBundle:Team/Crud seems to be getting parsed incorrectly. This code/config is from a Bundle which was setup on a prior version ~ 3 months ago and works correctly on the older project (1.0.0-beta.2) still.

When trying to install it on a new project (1.0.0-beta.3) I get an error:

The file "alias: app_team.team_member
section: admin
templates: AppTeamBundle:Team" does not exist in /var/www/vhosts/example/src/App/TeamBundle/Resources/config/routing.yml (which is being imported from "/var/www/vhosts/example/app/config/routing.yml").

I tried a few bits but the actually fix is just swapping the / for a \ so it becomes;
templates: AppTeamBundle:Team\Crud.

To me it feels like this is a bug with the parsing rather than a valid change to the setup which just hasn't been represented in the documentation.

The routing config was originally like this;

app_team_admin:
    resource: |
        alias: app_team.team_member
        section: admin
        templates: AppTeamBundle:Team/Crud
        except: ['show']
        redirect: update
        grid: app_team_admin
        vars:
            all:
                subheader: app_team.ui.team_member # define a translation key for your entity subheader
            index:
                icon: 'users' # choose an icon that will be displayed next to the subheader
    type: sylius.resource
    prefix: /admin

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

      0