question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom product URL don't work for all languages

See original GitHub issue

When adding a custom URL slug to a product for all languages, the shop doesn’t find the product.

How to reproduce:

  1. Fresh shop installation. Make sure, there are multiple languages activated.
  2. Create a new product named “My Product”. The product appears on the list of products in the frontend and links to /My_Product(correct)
  3. Edit the product, go to “Text” and add a new “URL segment”, select “All” for language and enter “new-name” as value. On the lists of products in the frontend, the product now links to /new-name(still correct, that’s what is expected)
  4. Click this product to view the product detail page. Now there is an error: Product "new-name" not found

By manually entering the URL /My_Product, the product can still be accessed.

I noticed, that the DB contains by default a URL for each language of the product. Adding the “URL segment” text adds just a row with an empty language ID to the DB.

By specifying a “URL segment” for each language, the problem is solved. It’s just the “All” option that doesn’t work. It seems like there is a priority problem, when fetching the data from the DB.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
aimeoscommented, Oct 1, 2019

The changes will be available in the upcoming 2019.10 releases (ETA: this month)

0reactions
aimeoscommented, Oct 2, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom taxonomies in product url not translated - WordPress.org
When I'm on a product page in EN, the language switcher directs to other languages without translating the category part of the url....
Read more >
7 - Why do all auto created urls in my multilingual site cause a ...
Creating content translation I've got such problem: all auto created url aliases don't work. When I change site language (as visitor) all seems ......
Read more >
apache - Custom 404 Page for a Multilingual (multi language ...
Doesn't work. When i type a wrong url outside the /nl/ directory it shows the error_nl.html version. It always shows the nl version....
Read more >
How do you create custom product URL's using the Sites and ...
Mark Richter (Customer) asked a question. ... How do you create custom product URL's using the Sites and Routes API? We're using the...
Read more >
WooCommerce Custom "Add to Cart" URLs - The Ultimate ...
Works like a charm but on pages with multiple product URLs, as part of text, images or buttons, it adds products to cart...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found