I can confirm that renaming all page types so names would not overlap did the trick, and now commerce product friendly Urls work, but this seems like a problem with new EPiServer Commerce code, because as far as I understand it is allowed to have two page types with the same page type name(because they will have different namespaces and GUIDs), but if you do so you will have this problem.
Renaming the contenttype classnames worked for us as well.
If the contenttypes lives in different namespaces, but have the same classname this code still breaks, so the classnames have to be changed.
And this is not just the commerce specific (Catalog)contenttypes you must change the names of, the conflicting (CMS specific) contenttypes must be changed as well.
This sounds like a bug to me. The unique metaclass name validation should not take content types from cms into consideration.
However, when we validate the name among the catalog content types we cannot take the namespace into consideration. The reason for that is that if you don't explicitly set a meta class name on your content type, we will use the class name as the name for the meta class (the backing store for catalog data). If you want to have two catalog content types with the same name in different namespaces you will need to set a unique MetaClassName on their CatalogContentTypeAttribute. But as I said, we shouldn't care about CMS specific content types when validating.
I've reported a bug for this:
#119804: Unique meta class validation for catalog content types validates against non catalog content types
I agree, it would be really convenient that next time I migrate some old EPiServer instance to latest, I would not need to do either of these things
I have more than one StartPage, but in different namespaces, when commerce 7.5 (7.6.1) SEO url is beeing resolved commerce tries to load all content types and fails when finds second StartPage with exception:
populateMetadataMappings code looks like this:
As it does not take into account namespaces, names overlap and YSOD is thrown.
Note: needed content type that renders commerce variations comes first in response from - this._contentTypeModelRepository.List()
Should commerce load all content types?
Is something wrong with my code?(Except that I have pageTypeNames with the same names in multiple namespaces)