We are trying to clean up language branch versions of commerce content that aren't "valid" anymore - we have a lot of bloated data impacting DB sizes, EpiFind etc for languages that aren't supported on our site anymore so should be deleted. We've disabled the languages in "Manage Website Languages", but want to clean up the erroneous data that we don't need anymore.
I'm doing this through a scheduled job - maybe not the best implementation but just dummy code for a trial, and have (so far) the following code:
contentRepository.DeleteLanguageBranch(currentVariant.ContentLink, invalidLanguage.Name, AccessLevel.NoAccess);
I receive "The method or operation is not implemented" - it looks like DeleteLanguageBranch can't run for commerce content links?
Can we have it be supported so we can trim the fat on a lot of bad data and make everything about our site leaner please :)?Regards
This was requested before but unfortunately it will not be done, at least not in near future. The premise of catalog content is that every child content (node/entry) will have the same language settings as the parent catalog. That behavior has been there from the beginning, and I don't think it will be revised any time soon.
You can delete a language from the parent catalog if you no longer need it for your entire product catalog.
@Quan - thanks for responding!Understand the implications for inheritance, thanks for clarifying.
RE: You can delete a language from the parent catalog if you no longer need it for your entire product catalog. - Do you mean unchecking from the top catalog:
Will this stop child catalog content (for example) being crawled by the find content indexing job - e.g. if I was to uncheck portugese, would portugese not be indexed into find from publish events & find job as it isn't "available" in said languages?
Yes, I can't see your screenshot, but it's basically uncheck the language when you edit the catalog.
The language version will not be deleted automatically, mind you, but they will not be visible (nor index, for that matter)
Perfect thank you Quan, really appreciate it.