Jump to content

Category - Page not found


Recommended Posts

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

post-723237-0-77897200-1384566827_thumb.png

post-723237-0-55367300-1384566832_thumb.png

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

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 by silver_anth (see edit history)
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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

×
×
  • Create New...