Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Name in URL property clash in multi-language scenario

$
0
0

Hi

Per above Epi documentation snippet, it says Name in URL must be unique within same parent category. From the example URL provided :

example.com/en/catalog/category/subcategory/product

Does it mean that if I have 2 languages on the site (en and sv), then the Name in URL part of "subcategory" needs to be unique for both en and sv language paths?

Issue : I'm trying to save a category in "sv" language after saving it in "en" and I get this error :

"Name in URL" with value "Candles-Shop-by-Vessel-Shop-All-Vessels" is already in use by Shop All Vessels (1073742273__CatalogContent).

This only happens when doing this programmatically. When doing this via the CMS Admin UI, it works fine.

What I've noticed so far in th code, is that it only looks at the URL Segment : category/subcategory/product, and not the full URL, to know the language branch. How can I make the code look at the full URL?

This is the code that throws above exception :

categoryLink = contentRepository.Save(newCategory, SaveAction.Publish | SaveAction.ForceNewVersion, AccessLevel.NoAccess);

Please advice.

Regards

Ritu


Viewing all articles
Browse latest Browse all 6894

Trending Articles