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.
Regards.
/Q
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.
Regards
/K
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.
Regards.
/Q
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?
Regards
/K
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.
Regards.
/Q
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)
Line 56:
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.
Regards.
/Q
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/
Hi,
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
http://pro.development.local/Util/login.aspx?ReturnUrl=%2fuk%2fdb%2fbooks%2fgaming%2fgame-genre%2faction%2fage-of-empires-1%2f
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.
Regards
Khurram