Jump to content

[SOLVED] Oops 2 products cache product.tpl Next Previous


Recommended Posts

Here's a new case if it helps anyone. You do not need to copy/delete your product. Non coders can skip to the Solution below.

 

PS v1.5

2 sequential products in a category.

Both spit an Oops (500) error.

Do config/defines.inc.php: _PS_MODE_DEV_ = true

Debug says there's an exception in Link.php but no matter what var_dumping you do (int)$product is valid!

Finally take a look in the topmost cached .tpl: cache/..../...file.product.tpl.php

Note that the first product errors a few lines after the second one does and these tpl lines are about generating Next and Previous buttons.

Debug shows that these have empty values for Previous on 2nd product and Next on 1st product...i.e. between themselves.

 

Solution: No need to waste any more time. Simply change the category for one of the products and save. The other product will start working. Change the product back to the correct category, reorder it  as before. All is now well.

 

Conclusion: The issue is not with class/Link.php line 104, you should always start your search at the line indicated in the cache .tpl

Edited by Spazbot (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...