You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes a problem when we make a mistake in our own routing. If so, it returns always this error:
Exception thrown when handling an exception (Symfony\Component\Config\Exception\LoaderLoadException: Do not add the "sitemap" loader twice in . (which is being imported from "/sylius/vendor/stefandoorn/sitemap-plugin/src/Resources/config/routing.yml"). Make sure there is a loader supporting the "sitemap" type.)
If we comment out the route configuration above, we get the correct error: (as example, in my case)
Exception thrown when handling an exception (Symfony\Component\Config\Exception\LoaderLoadException: The routing file "/sylius/config/routes.yaml" must not specify both the "resource" key and the "path" key for "app_custom". Choose between an import and a route definition in /sylius/config/routes.yaml (which is loaded in resource "/sylius/config/routes.yaml").)
And this is the same issue everytime we make an error in our config.
This is kind of very annoying actually.
Can we try to find a solution to avoid this behavior?
What do you think?
Thanks!
How to reproduce
Of course with the sitemap bundle loaded.
In your config/routes.yaml, add these lines:
example:
resource: "toto.yaml"
Do not create the toto.yaml file.
Reload and you'll get the error …Do not add the "sitemap" loader twice in….
Now, comment the lines in the routing of the bundle like written above in the description.
Reload and you get this error: …The file "toto.yaml" does not exist…
This is much better don't you think?
Thanks!
The text was updated successfully, but these errors were encountered:
@jacquesbh Could you try removing the Exception and letting it load twice? I'm curious what happens to the routing table and performance if the router get's executed twice. Alternative is to see in case it's already loaded, to just return an empty RouteCollection.
Hi!
In your routing you have:
This causes a problem when we make a mistake in our own routing. If so, it returns always this error:
If we comment out the route configuration above, we get the correct error: (as example, in my case)
And this is the same issue everytime we make an error in our config.
This is kind of very annoying actually.
Can we try to find a solution to avoid this behavior?
What do you think?
Thanks!
How to reproduce
Of course with the sitemap bundle loaded.
In your
config/routes.yaml
, add these lines:Do not create the
toto.yaml
file.Reload and you'll get the error
…Do not add the "sitemap" loader twice in…
.Now, comment the lines in the routing of the bundle like written above in the description.
Reload and you get this error:
…The file "toto.yaml" does not exist…
This is much better don't you think?
Thanks!
The text was updated successfully, but these errors were encountered: