silver_anth Posted November 16, 2013 Share Posted November 16, 2013 (edited) Hi, On my website all the category pages redirect to a page not found page. I believe this is because of a problem in my database. I tried to import a csv into my categories but my Home category was removed. I then manually modified ps_category,and ps_category_lang. I believe I have made a mistake somewhere in my editing, could I be supplied with some information on the default layout etc. Attached is a screenshot of my database. Thanks Edited November 16, 2013 by silver_anth (see edit history) Link to comment Share on other sites More sharing options...
silver_anth Posted November 16, 2013 Author Share Posted November 16, 2013 Anyone? Link to comment Share on other sites More sharing options...
vekia Posted November 16, 2013 Share Posted November 16, 2013 have you tried to regenerate htaccess file ? or also disable / enable friendly urls ? Link to comment Share on other sites More sharing options...
silver_anth Posted November 16, 2013 Author Share Posted November 16, 2013 (edited) have you tried to regenerate htaccess file ? or also disable / enable friendly urls ? Thanks for your reply, yes I have tried both of these things, but I do believe it is something to do with my database. I have tried to find an original copy/working copy of the ps_category table so I can see if mine is wrong in anyway, you wouldn't happen to have one? Edited November 16, 2013 by silver_anth (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 17, 2013 Share Posted November 17, 2013 ok so for test purposes please open catalog > categories page in your BO, please open one of the categories, edit something, and then save changes. catagory is available in FO after that? or still the same problem? Link to comment Share on other sites More sharing options...
silver_anth Posted November 17, 2013 Author Share Posted November 17, 2013 ok so for test purposes please open catalog > categories page in your BO, please open one of the categories, edit something, and then save changes. catagory is available in FO after that? or still the same problem? Still the same problem. Link to comment Share on other sites More sharing options...
silver_anth Posted November 17, 2013 Author Share Posted November 17, 2013 BUMP Link to comment Share on other sites More sharing options...
stottycabanas Posted November 17, 2013 Share Posted November 17, 2013 You have two categories (34 and 35) which have the column is_root_category set to 1 in the ps_category table. I don't know if these were attempts to replace the Home category (usually id_category = 2), but there are no other categories that have 34 or 35 as their parent category. Nor are there any other 'root' categories. Plus you have a load of categories with id_parent set to 1 - normally it's only the Home category, or other categories that are root categories, which would have a parent category of 1 (which is the category somewhat confusingly called Root). In short, your category structure has lost its integrity. I recommend you do a fresh install to a clean test environment, than look at the ps_category table via phpmyadmin to see how the structure is formed for the demo categories - the default layout, as you called it. Then, armed with that understanding, either update the database you have now, or restore the backup you took before the csv import and adjust the csv import process to get the desired results. Safer still, revert to your backup, forget the csv import and key the categories in one at a time via back office. It may cost you a couple of hours, but at least you won't be taking risks with your database. Cheers, Dave 1 Link to comment Share on other sites More sharing options...
silver_anth Posted November 17, 2013 Author Share Posted November 17, 2013 You have two categories (34 and 35) which have the column is_root_category set to 1 in the ps_category table. I don't know if these were attempts to replace the Home category (usually id_category = 2), but there are no other categories that have 34 or 35 as their parent category. Nor are there any other 'root' categories. Plus you have a load of categories with id_parent set to 1 - normally it's only the Home category, or other categories that are root categories, which would have a parent category of 1 (which is the category somewhat confusingly called Root). In short, your category structure has lost its integrity. I recommend you do a fresh install to a clean test environment, than look at the ps_category table via phpmyadmin to see how the structure is formed for the demo categories - the default layout, as you called it. Then, armed with that understanding, either update the database you have now, or restore the backup you took before the csv import and adjust the csv import process to get the desired results. Safer still, revert to your backup, forget the csv import and key the categories in one at a time via back office. It may cost you a couple of hours, but at least you won't be taking risks with your database. Cheers, Dave Thank you so much for your reply, I see what you mean with the categories, I'll try to remedy these mistakes from a fresh install of the database. Link to comment Share on other sites More sharing options...
Recommended Posts