hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

[BUG] Nav menu links not linking correctly in Hydrogen

Open frankliu-shop opened this issue 3 years ago • 0 comments

Describe the bug When adding Navigation menu links in Shopify Admin, some links don't work on Hydrogen, but they work on Shopify Online Store.

To Reproduce Online Store link: https://development.theweekendfort.com/ Hydrogen link: https://hydrogen-test-1de06929f5054b859cc3.o2.myshopify.dev/

On Online Store, all links work (Account, Google, Account 2) On Hydrogen link, Account and Account 2 don't work.

Account links to https://the-weekend-fort-development.account.myshopify.com/ Account 2 links to https://the-weekend-fort-development.account.myshopify.com/info

However, the Google link linking to https://google.com/ works correctly.

Per Juan Pablo Prieto

It's possible that our parseMenu helper function in the demo-store is incorrectly parsing these urls. We are currently parsing nav links because the Menu API provides only fully qualified urls, but Hydrogen's routing requires relative urls.

Expected behaviour Links should work correctly.

Additional context https://shopify.slack.com/archives/C028UNNRJAH/p1663194262093949

frankliu-shop avatar Sep 14 '22 23:09 frankliu-shop