I am using default routing as CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false);
Example Product URL is http://pro.development.local/uk/db/books/gaming/game-genre/action/age-of-empires-1/, It works fine
If I set Available=False for this product from Commerce manager, I expect it will redirect to 404 but rather it is redirecting to
I put a breakpoint in Controller Index method but it doesnot hits that line.
I am wondering is it a bug and where can I take the control for this situation to redirect user to 404.
Please Note: If I am already logged in as admin then it shows me 404.
For me it sounds like a bug, as it is not consistent with what we behave with CMS contents.
I filed a bug for that to see if this needs to be changed.
Hi Quan/Thanks, Can you please add another test case, i.e. Product availability is true but publishing starting date is in future or expired.
Can you please tell me bug Id for tracking.
Unfortunately our triage team decided to leave the behavior as-is, i.e closed the bug as won't fix. Currently we have work items in higher priority so there'll be no changes for now.
We might revisit later if this bug makes sense for many customers.
Well its Ok, So how can I get the control of a request if it the requested Product is not avaialbale any more? Will you recommend me to do custom routing?
Sorry for the late reply - was quite busy this time. I see no easy solution for this - so you might need to create a support ticket for proper investigation.
No problem, Thanks for your time. I will raise a support ticket.
Due to your support ticket, we reopen the bug for investigation, and a colleague of mine has this fix (in RenderBase.cs of Sample site)
My application is an MVC project and not based on sample, will you advised me what will be best location for this check in MVC Enviornment, If you want to have a look on project You prbably will have FTP details.
For MVC site it's a bit different. We discovered that for MVC site the problem is the same for page and product. Therefore the bug need to be fixed in CMS instead. So you'll need to wait a bit more to get the behavior you want.
If someone is intereted ... Bug id is 116989(Inconsistent behavior with unpublished content)
Once bug is made public that can be followed on http://world.episerver.com/Support/Bug-list-beta/