hozana / next-translate-routes

Flexible and translated routes for Next.js without custom server
MIT License
116 stars 30 forks source link

Bug - translateUrl #17

Closed Bast1onCZ closed 2 years ago

Bast1onCZ commented 2 years ago

Hello, I've found a bug when trying a catch-all route (https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes).

For a page represented by file in next /pages/destination/[...destinationSlugs], when trying to use <Link href="/destination/europe" />, I receive replaced link /destination/[...destinationSlugs]?destinationSlugs=europe instead of /destination/europe.

The only problem is when the [...destinationSlugs] variable should be replaced with only one level of slug. If there are more of them, it works OK (e.g. /destination/europe/prague).

Could you please have a look at it?

cvolant commented 2 years ago

@Bast1onCZ It should be fixed. Please tell me if you still experience this issue with 1.7.1.

Bast1onCZ commented 2 years ago

@cvolant I'm sorry, after updated to 1.7.1, I still experience the same issue as described above

frederikvanhevel commented 2 years ago

also experiencing the same issue

Bast1onCZ commented 2 years ago

Any updates on this, please? I've found out that this problem occurs only in client environment and therefore these errors are shown: image

cvolant commented 2 years ago

I will work on it next week.

cvolant commented 2 years ago

@Bast1onCZ Could you try 1.7.2? I think it fixes the issue this time, so I am closing this issue again. Please re-reopen it if you still have the problem.