I am getting 404 error pages from Magento on product and category pages. All other pages are working ok (including search and content pages). I have rebuilt all caches several times and now turned them completely, I have re-indexed everything to no avail. I don’t believe this is a re-writing problem as accessing the pages directly via the full url also returns the same error, and re-writing is working fine in the searc, blog, cms etc.
I’ve spent roughly 6 hours trying to fix this bug now, including copious Googling and found similar problems on here as well (such as Magento product and category pages return magento 404) but none of the solutions addressed my problem.
I think the problem must be in either one of my layout XML files or a template PHTML file. I have tried replacing all my custom files with base Magento ones however and the problem still persists.
I have turned on Developer mode in index.php and enabled full logging (including creating the log files with full write permissions) – there are still no helpful error messages and nothing goes into the log files.
It’s getting pretty desperate now – if anyone can suggest any further steps to try I would be very grateful!
You can see the problem here: http://staging.albionwine.co.uk/wines
I managed to finally resolve this issue by backing up my skin, layout and template folders as well as the database, then completely wiping the magento installation and replacing it with a clean one. After re-uploading the backed up folders and DB, I had all my customisations back and the error had gone. I can only think that at some point, one of the core files was inadvertedly edited.