I forgot my screen
![]()
I forgot my screen
![]()
Giovanni,
Zen Cart V2.1
ok. i can going to humbly disagree.
ZC needs to keep it simple. the sanitizer is for sanitizing variables. period. it should not redirect. if a product is in-active and hence not displayed, ZC should generate a 404 without a redirection. session, no session; it should not matter.
the OP said this was an issue dealing with his google ranking and he thinks its because of the 302 to 404. i can not say if his ranking is hurt due to the redirection; i can only say redirecting to a 404 makes zero sense. if no session is started, MC says this behavior would not happen. i can not say. i can only say that this behavior is wrong. and commenting out that line addresses the problem. it does absolutely nothing with regards to ZCs sanitizing of variables. you come to page with a product that does not exist or that is inactive; don't have google or anyone else index the page. sanitize the variables and give them the 404.
i have read no argument in this thread that warrants further discussion, IMHO, as to why that redirect is there. unless someone can convince me otherwise, i see no reason for it to be there; nor for changing it to a 404 and then another 404.
it's the sanitizer. sanitize the variables. move on. keep it simple.
as far as it not working for diamond1, i tested it on a vanilla install of v160. works fine. i tested it on my development v155 with lots of other plugins and modified templates, also works fine. if it does not work for him, i can not say what the problem might be. i'm sure some troubleshooting could address it.
as further proof of why i think this is wrong, lets say a ZC store created a new product type, with a new display page. someone went to this page:
index.php?main_page=product_awesome_info&products_id=164025566
it would generate a 302, and then ZC redirects to:
index.php?main_page=product_info&products_id=164025566
where a 404 gets generated.
now if the ZC store owner wanted different 404 pages shown for the different product types, he could not do it all because of the redirect. and the ZC store owner would even need to change the redirect code in the sanitizer associated with this unneeded redirect.
best.
Bookmarks