I've worked around this by re-using some code from another project.
We now use a custom ContentFinder. It strips the language-part from the URL, and we use that part to get the product by the given slug.
So:
https://mysite.nl/de/my-product goes in, we strip it down to "my-product" and get the product by slug "my-product" and return it.
This seems to solve the problem in this case. But it's a bit weird that it doesn't seem te work by default. Unless a colleague (who made our merchello-base project) has made an error somewhere. I will ask him once he is back in the office.
Slug containing "language part" of URL
We are experiencing a weird problem with products at the moment.
We add the language in Umbraco to the URL (I guess this is a common solution). So: Dutch: mysite.nl German: mysite.nl/de English: mysite.nl/en
But we noticed we get a 404 on our merchello product pages, when that language-part is present in the product-slug.
A product with a slug like "product-de-luxe" results in a 404 Also a product-slug containing "gardeer" results in a 404 on the german (/de) site.
Same goes for products containing words like "Green" and "Mugen" in the slug. They all result in 404 pages on the english (/en) site.
Is there any solution to this problem?
Hey Jeroen.
I'm not sure if this will help your issue but have you tried looking at the actual slug values saved in the merchProductVariantDetachedContent table?
We had a few issues with variant urls and needed to make some changes directly in the table to get around it.
Dave
Hi Dave,
I've worked around this by re-using some code from another project. We now use a custom ContentFinder. It strips the language-part from the URL, and we use that part to get the product by the given slug.
So: https://mysite.nl/de/my-product goes in, we strip it down to "my-product" and get the product by slug "my-product" and return it.
This seems to solve the problem in this case. But it's a bit weird that it doesn't seem te work by default. Unless a colleague (who made our merchello-base project) has made an error somewhere. I will ask him once he is back in the office.
is working on a reply...