Try our conversational search powered by Generative AI!

Routing for multilingual site

Vote:
 

I am using CatalogRouteHelper.MapDefaultHierarchialRouter(routes, false); to use default commerce routing for mvc site.
My site is multiLingual
My page properly resolves for
http://site.development.local/us/dk/books/business
http://site.development.local/uk/dk/books/business
where business is category code.

It also resolves the page for
http://site.development.local/uk/business-isbn1
http://site.development.local/us/business-isbn2
where business-isbn1 is SEO URL for UK culture and business-isbn2 is SEO URL fro US Culture.
but gives below error first time on refreshing page it resolves.
The routed data is of type 'Castle.Proxies.WelcomDigitalNodeProxy' and the node context data is of type 'Castle.Proxies.WelcomDigitalNodeProxy', neither of which matches the requested type 'DK.BusinessModel.Models.Pages.SitePageData'.

It doesnot resolve url
http://dk.development.local/uk/business-isbn
http://dk.development.local/us/business-isbn
where business-isbn is a SEO URL for both culture
It Gives the error
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Exception in ecf_CatalogNode_UriLanguage: Column 'CatalogNodeId' is constrained to be unique. Value '576' is already present.Column 'CatalogNodeId' is constrained to be unique. Value '576' is already present.Column 'CatalogNodeId' is constrained to be unique. Value '576' is already present.]
Mediachase.Data.Provider.SqlDataProvider.LoadDataSet(DataCommand command) +1467

Using profiler i checked it is executing
exec ecf_CatalogNode_UriLanguage @ApplicationId='145D484C-0A7F-43C6-819D-64CA794A7C55',@Uri=N'business',@LanguageCode=NULL,@ReturnInactive=1
where LanguageCode is null.

Clients want to use default routing based on SEO URL key like http://dk.development.local/uk/business-isbn, How can i use that?

I am wondering what type of URLs   HierarchicalCatalogPartialRouter suuports?

Regards
/K

[Pasting files is not allowed]

#88578
Jul 17, 2014 15:48
Vote:
 

First part of this question is a known bug

http://world.episerver.com/Support/Bug-list-beta/bug/115733/

I am still looking answe for 2nd part. Any Help?

Quan, do you have any idea?

Regards

/K

#88598
Jul 18, 2014 10:59
Vote:
 

Hi,

Just to clarify, the "Seo Uri" you're referring is the Uri Segment?

What's is the stacktrace of the error you're getting:

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Exception in ecf_CatalogNode_UriLanguage: Column 'CatalogNodeId' is constrained to be unique. Value '576' is already present.Column 'CatalogNodeId' is constrained to be unique. Value '576' is already present.Column 'CatalogNodeId' is constrained to be unique. Value '576' is already present.]
Mediachase.Data.Provider.SqlDataProvider.LoadDataSet(DataCommand command) +1467.

From what I see, it seems to be a bug with UriSegment handling for Commerce contents. But I can't say for sure until I can reproduce it.

Regards.

/Q

#88622
Jul 21, 2014 8:15
Vote:
 

Hi Quan,

Thanks for response, Richley from service desk confirmed it as a bug #115993.

Other situation is also a bug #115733.

Happy Bug fixing :)

Regards

Khurram

#88635
Jul 22, 2014 10:59
Vote:
 

I was briefly working on bug #115993, which was unable to reproduce on our internal MVC site. We need more information about how to reproduce the bug, which might include your code and catalog.

Regards.

/Q

#88714
Jul 28, 2014 6:10
Vote:
 

Hi Quan,

Thanks a lot, you are always very helpful, I will have to upgrade to 7.10 as I am on 7.9 at this time. I will try and will let you know results after upgrade. I have following ftp details.

Hostname: support.ep.****

Username: we**_14**

Just in case if I will have the issue after upgrade can you please send me ftp details on my email address. (KKhan@welcom.co.uk)

Regards
/K

#88816
Jul 31, 2014 10:50
Vote:
 

For your first issue (aka bug #115773), I believe that your have Index action as something like this:

public ViewResult Index(FashionProductContent currentContent, HomePage currentPage, string size, string color)

This should be avoided. The HomePage instance should be get via IContentRepository instead of pretending it like "current page". My suggestion is you change it some thing like this:

public ViewResult Index(FashionProductContent currentContent, string size, string color)

and in your _modelFactory.CreateVariationViewModel (or something you're using), you get HomePage from IContentRepository.

I'm working on bug 115773, but the change will only affect to our MVC site. The issue was with the implementation, not on the Commerce itself.

Regards.

/Q

#88820
Jul 31, 2014 13:23
Vote:
 

Thanks Quan, Your recomended change fixed this below issue

http://site.development.local/uk/business-isbn1
http://site.development.local/us/business-isbn2
where business-isbn1 is SEO URL for UK culture and business-isbn2 is SEO URL fro US Culture.
but gives below error first time on refreshing page it resolves.
The routed data is of type 'Castle.Proxies.WelcomDigitalNodeProxy' and the node context data is of type 'Castle.Proxies.WelcomDigitalNodeProxy', neither of which matches the requested type 'DK.BusinessModel.Models.Pages.SitePageData'


It didn't resolve yet and getting same error

http://dk.development.local/uk/business-isbn
http://dk.development.local/us/business-isbnSetup Details:

There are three Markets(US primary language en-us,UK primary language en-uk,CA  primary language en-ca)
There are three languages for catalog (en-ca,en-uk,en-us)
seo url is same for a category en-ca,en-us and en-uk

Let me know if you need db and code, I have the ftp details now.

Regards
/K

#88860
Aug 01, 2014 11:21
Vote:
 

Hi,

Glad to here that you fixed the first issue. For the second issue, please update those information with our Support service.

Regards.

/Q

#88863
Aug 01, 2014 11:44
Vote:
 

Hi,

The second bug is now fixed and will - hopefully- be released this week.

Regards.

/Q

#89196
Aug 11, 2014 10:21
Vote:
 

there is a problem, there's a Quan(Problem solver)

#89197
Edited, Aug 11, 2014 10:27
Vote:
 

Can I expect this fix in 7.10.3?

#89475
Edited, Aug 18, 2014 13:02
Vote:
 

No, it's will be included in 7.11.0 release, which is under testing right now. If nothing strange found, it'll be released at the end of this week.

Regards.

/Q

#89502
Aug 19, 2014 3:57
Vote:
 

Wow, this is what I call awesome support! Cheers Quan (and servicedesk)! =)

#90546
Sep 11, 2014 23:33
Vote:
 

I appriciate Quant to lead and make the support and forumns so effective. It wasn't like this at least till a year before for me. He is not only skilled but also an 'always ready to help' person.
/K

#90564
Sep 12, 2014 10:02
Vote:
 

Thank you for your kind words. This is effort of the whole team in EPiServer, including development and support teams. We're trying to, not only create better products, but also better community for EPiServer products. And you're helping greatly with that mission.

Regards.

/Q

#90570
Sep 12, 2014 11:49
Vote:
 

I want to add action after the partial route. is that possible?

E.g. there is a category page that I want to implement paging on. So I would like to have ChangePage Action inside the controller for that category. Right now it looks like the SEO URL does not support the actions.

#114856
Dec 24, 2014 18:42
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.