Closed torvista closed 6 months ago
Interesting; if you can replicate that would be great.
Phew... CeonUriMapping can add a ?cPath=3_26_1446_4108, whatever to the end of a static url. If some dumb spider tries to use such an url on a product that has since been moved, that old cPath is not valid for that product.
I suppose it should be handled elsewhere, but when $this->productsArray is created from that old cPath, the current product_id is not in the array, so the subsequent if ($values['id'] === (int)$_GET['products_id']) { never happens.
I added a clause in the function isPaginationEnabled to catch it and redirect 301 to the product, as I don't think it can happen through human navigation.
This may also be related to the Product Finder mod I use, so all this is for possible future reference and not any action.
This is triggered on my site by going to a product info page (having the wiki snippet), which is the first product in the listing, from another category entirely. Unfortunately I've not been able to duplicate this on a vanilla ZC2 install, yet.
I suspect it's something odd in my site, so this is here for the record only.
I've initially fixed it by setting $nextPosition=0;