Open timo002 opened 4 months ago
If you remove that listener, you have 0 route registered ?
Yes, it is a dynamic URL so if I remove the listener noting is running the code for generating the XML
So, it means that your listener is called twice
Can you show the calls traces ? XDebug or
try {
throw new \Exception();
} catch (\Throwable $exception) {
dump($exception->getTraceAsString());
}
I created a EventListener for dynamic routes and my app is multilanguage (nl / de). I created landingpages that are multilanguage, for example the following two URL's exist:
I'm using the following route:
#[Route('/{_locale}/{permalink}', name: 'webshop_landingpage', requirements: ['_locale' => '%app.locales%'], methods: ['GET'], priority: -1)]
The following code is used in
But now it adds each URL twice in the XML file, first a set of the NL and DE version. And then the same URLs again.
Any idea how I can fix this?