Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jeroen Oostwouder 100 posts 296 karma points
    May 03, 2021 @ 09:01
    Jeroen Oostwouder
    0

    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?

  • Dave Clinton 31 posts 106 karma points
    May 05, 2021 @ 09:08
    Dave Clinton
    0

    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

  • Jeroen Oostwouder 100 posts 296 karma points
    May 05, 2021 @ 09:24
    Jeroen Oostwouder
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft