#One of my page routes returns a 404 error when using the localized version, I need some help

18 messages ยท Page 1 of 1 (latest)

gritty idol
#

When I access http://localhost:3000/ro/user/3a969cff-0284-4043-b97b-dfc2eaad8a2a it works just fine, the page loads and everything

However, when using http://localhost:3000/ro/utilizator/3a969cff-0284-4043-b97b-dfc2eaad8a2a I get a 404 - page not found in the browser

Here is my navigation code which handles the paths:
https://paste.ec/paste/M7FJnHOM#zAfLPNUFAGjpj5ekmwPjlzwFbeyL+z4cZk0pRrdixvx

Here is my middleware code:
https://paste.ec/paste/kPbeU63R#UX9MkRfcysh8hs5QkqZebZEbg7N69dhQK3XT2SvhgPq

I'd like to mention that the link localization for my login and sign-up pages works.

And here's the location of the files responsible for the profile page:

// src/app/[locale]/user/[userId]/client.tsx
// src/app/[locale]/user/[userId]/fetch-user-data.tsx
// src/app/[locale]/user/[userId]/page.tsx

pastel mangoBOT
#

๐Ÿ”Ž This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

๐Ÿ•ต๏ธ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

โœ… You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

gritty idol
#

Up

gritty idol
#

Up

gritty idol
#

One of my page routes returns a 404 error when using the localized version, I need some help

short willow
#

@gritty idol sup lmao

#

uhh so your question is very detailed.. but its too detailed

#

nobody is going thru all that code xD

#

also one bump per day :/

#

but yea, do your own investigations and try and find out what could be causing it, and show the code here.. we can help in figuring out why its breaking.. not whats breaking

gritty idol
#

I tried in different ways to solve it since yesterday, haven't found a solution to it yet, I think the issue is related to incorrect routing configuration somewhere;

  • Either in the navigation file on this line:
  "/user/profile/:userId": { en: "/user/profile/:userId", ro: "/utilizator/profil/:userId" }
  • Either somewhere in the middleware
  • Either somewhere in the profile page code (which I didn't share yet)

I tried logging the issue but the logs wouldn't show because the routing is incorrectly set-up (404 - page not found) so the page won't load when the route I'm trying to access doesn't work at all.

The code I shared is because I think you have to understand how my routing is set-up first, if you want to help me.

Anyways, I'm still trying to figure out what's causing this issue, if anyone knows what may cause it let me know, if not no worries, I'll find out what's causing it, it's just a matter of time ๐Ÿ˜

gritty idol
pastel mangoBOT
#
โœ… Success!

This question has been marked as answered! If you have any other questions, feel free to create another post

Jump to answer
dusky leaf
pastel mangoBOT
#
โœ… Success!

This question's answer has been removed.