Closed lightbyte closed 3 years ago
Hi and sorry for the long wait...
Were you able to solve this issue?
It's a bit weird that there are duplicate es.sitemap
routes...
If this is still a problem, let me know and I'll try to help you out.
Hi Ivan, I guess I did what its posted above, it was long time ago, but it's still working. Thanks for asking.
Can you show me how you registered the sitemap route?
I assume env('APP_URL_EN')
and env('APP_URL')
are domains?
I'll try to reproduce this in a test then.
Found the bug that most likely caused your issue. Will tag the fix soon. 👍
Tagged and released in 2.5.0 🎉
Hi, in April 2020 I've made a project in Laravel 7 and this laravel-localized-routes
v2.2.6
. Now in October I installed in a new computer the development project and composer install downloaded the same version but it was changed, it started making error when tryingartisan route:cache
I have updated the libraries withcomposer update
and now withversion 2.3.2
has the same issue:Unable to prepare route [sitemap.xml] for serialization. Another route has already been assigned name [es.sitemap].
The route:list shows the route for ES locale twice so when caching routes, the second one crashes with this error.
I have removed the fix for https://github.com/codezero-be/laravel-localized-routes/issues/28 in the file
laravel-localized-routes/src/Macros/LocalizedRoutesMacro.php
in line 31 and it worked.My configuration file localized-routes.php has:
I don't know if I'm doing something wrong or maybe the fix didn't work for all cases.