Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when registering US Region #8952

Closed
SkullXA opened this issue Sep 2, 2024 · 8 comments
Closed

Issues when registering US Region #8952

SkullXA opened this issue Sep 2, 2024 · 8 comments

Comments

@SkullXA
Copy link

SkullXA commented Sep 2, 2024

System information

Medusa version (including plugins):
Node.js version: 20.3
Database: localhost / Postgres
Operating system: windows

Steps to reproduce the behavior

  1. Setup a new Medusa 2.0 backend and starter website

  2. Create new region, set united state as country, set USD as default payment processor

  3. Storefront doesn't find the new region, only existing regions, when I go to localhost:8000/us it doesn't display any products just the default Medusa storefront header and footer but missing all the products, and when I try to access a product via direct url

  4. Issue gets temporarily resolved for some reason when I do the following:

Menu: shipping to: (I would select any country, doesn't matter however United States DOES NOT APPEAR)

--then once I select that Europe country, I go to products and add a product to the cart, once I do that for some reason it works and now when I go to menu United States appears and all the functionality works, however when I remove the product from the cart it goes back and doesn't seem to find the United States region..

I believe this is some issue with the storefront and backend middleware.ts

Expected behavior

United States as my default region on my storefront and backend

Edit: also when I create a new region and set the country as United States and USD as default, the account system doesn't work I can't register an account or login via the FRONTEND, backend works fine.

@olivermrbl
Copy link
Contributor

olivermrbl commented Sep 4, 2024

I imagine this is an issue with the Next.js cache and not directly related to Medusa. We cache the regions to save a call to the DB, as they rarely change. Busting the cache and restarting the Next.js server should solve the issue.

As with the account system, we will look into that. Sounds very strange that these two domains affect each other.

@olivermrbl
Copy link
Contributor

So, I checked the account system issue. We had a minor bug that I fixed.

You can introduce the changes from this commit, and it should resolve your issue.

@thunderwin
Copy link

same issue here. did the fixed above ,, issure still here. empty homepage, and no products for later added region like US..

@SalahAdDin
Copy link

same issue here. did the fixed above ,, issure still here. empty homepage, and no products for later added region like US..

can you add a trace log?

@mousiyah
Copy link

Hello I am having the same issue. There is definitely a bug that products are not displaying on newly added region. Please can you fix it asap?

@SalahAdDin
Copy link

Hello I am having the same issue. There is definitely a bug that products are not displaying on newly added region. Please can you fix it asap?

can you add the trace log?

@sludwikowski
Copy link

just do - rm -rf node_modules .next package-lock.json in storefront and reinstll packages - worked for me

@paulinalydav
Copy link

I'm wondering why (and whether this is related with this bug) when I try to create a new product (not seeded) it won't show on the storefront, but it appears on recommendation?

I can go the product details, but it just won't show on fetch all products

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants