Jump to content

[SOLVED] Editing categories, suddenly they're deleted and can't access the site?


Recommended Posts

Hi,

 

I was editing my categories (adding descriptions, embedding a video). I then clicked 'SAVE'.

 

Next thing I know, I try to access my front end only to be greeted by 'INTERNAL SERVER ERROR 500'. I cannot no longer access my front page.

 

I can access the back office, and see that all my categories that I worked hard on (and uploaded numerous products to) have disappeared!

 

Can anyone please help me? 

 

My site is: www.stilllivelucky.com

 

I can provide admins with my sign in details to take a look (i'm not very code-abled).

 

Please help me.

 

Thanks.

Link to comment
Share on other sites

Hi,

 

I was editing my categories (adding descriptions, embedding a video). I then clicked 'SAVE'.

 

Next thing I know, I try to access my front end only to be greeted by 'INTERNAL SERVER ERROR 500'. I cannot no longer access my front page.

 

I can access the back office, and see that all my categories that I worked hard on (and uploaded numerous products to) have disappeared!

 

Can anyone please help me? 

 

My site is: www.stilllivelucky.com

 

I can provide admins with my sign in details to take a look (i'm not very code-abled).

 

Please help me.

 

Thanks.

 

hello , in my same trouble , i recreate .htaccess and upload via FTP to root of my site and change .htaccess to CHMOD 777 

hope it can help you for 500 Internal Error Server

Link to comment
Share on other sites

Hi nickelus,

 

I checked the database, and found out that there is indeed a problem with the category. Somehow the parent of the edited category was it's own child. So we had a category whose child was it's parent.... creating a mess.

A

|__B

   |__A

      |__B... etc

 

Fixed by changing the id_parent of the edited category in the database to the ID of category 'home'. then everything worked again.

 

pascal

Link to comment
Share on other sites

Hi nickelus,

 

I checked the database, and found out that there is indeed a problem with the category. Somehow the parent of the edited category was it's own child. So we had a category whose child was it's parent.... creating a mess.

A

|__B

   |__A

      |__B... etc

 

Fixed by changing the id_parent of the edited category in the database to the ID of category 'home'. then everything worked again.

 

pascal

Hi there I am having the same issue, and have been trying to resolve it for a few days now.  I have managed to lose all of my categories and they do not appear until i hit reset on the categories page.  Then I can see them but cannot edit their tree structure or parents.  I now have no way to repair any of my categories because some of my modules worked with the original home however I have no way to access the original home category.  When I delete a few categories, EVERYTHING disappears.  can you perhaps go more in depth to this article so I can fix my category tree.  This is driving me nuts!!  

 

Link to post with more info about problem

Also at one point I had a redirect loop I had to fix with this code.

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

roamencota,

 

can you post the contents of your ps_category table? What you will probably see is a few items that have each other as parent/child, like this:

 

 

id_category   id_parent

22            23

23            22

 

 

Which of course gives an endless loop when traversing.

 

Please post the table contents, and then we see if the problem is similar or not.

 

 

(P.S. you can get the contents of the ps_category table from within the Back office, by using the advanced parameters->sql manager

-press add new

add a name ('all categories' or so)

add sql statement:   SELECT * FROM ps_category

and save. then run the sql statement

 

copy and paste result

 

pascal.

Link to comment
Share on other sites

roamencota,

 

can you post the contents of your ps_category table? What you will probably see is a few items that have each other as parent/child, like this:

 

...

 

pascal.

 

Yes.  Heres an error I got. 

  • When saving the query, only the request type "SELECT" is allowed.

 

 

id_category;id_parent;id_shop_default;level_depth;nleft;nright;active;date_add;date_upd;position;is_root_category;
"1";"0";"1";"0";"1";"10";"1";"2013-04-29 10:47:45";"2013-04-29 10:47:45";"0";"0";
"25";"47";"1";"2";"3";"12";"1";"2013-12-27 20:35:44";"2014-02-14 13:52:51";"1";"0";
"34";"25";"1";"3";"4";"11";"1";"2014-02-12 14:27:20";"2014-02-12 14:27:20";"0";"0";
"57";"1";"1";"1";"2";"9";"1";"2014-02-16 09:53:58";"2014-02-16 09:53:58";"0";"1";
"64";"58";"1";"2";"11";"12";"1";"2014-02-16 10:02:25";"2014-02-16 10:02:25";"0";"0";
"65";"58";"1";"2";"13";"14";"1";"2014-02-16 10:02:39";"2014-02-16 10:02:39";"0";"0";
"66";"59";"1";"2";"11";"12";"1";"2014-02-16 10:12:56";"2014-02-16 10:12:56";"0";"0";
"67";"59";"1";"2";"13";"14";"1";"2014-02-16 10:13:03";"2014-02-16 10:13:03";"0";"0";
"68";"57";"1";"2";"3";"4";"1";"2014-02-16 12:27:51";"2014-02-16 12:27:51";"0";"0";
"69";"57";"1";"2";"7";"8";"1";"2014-02-16 12:28:09";"2014-02-16 12:28:09";"0";"0";
"70";"57";"1";"2";"5";"6";"1";"2014-02-16 12:28:15";"2014-02-16 12:28:15";"0";"0";
"71";"0";"1";"0";"0";"0";"1";"2014-02-16 13:21:33";"2014-02-16 13:21:33";"0";"0";
"72";"0";"1";"0";"0";"0";"1";"2014-02-16 13:21:56";"2014-02-16 13:21:56";"0";"0";
"73";"0";"1";"0";"0";"0";"1";"2014-02-16 13:22:41";"2014-02-16 13:22:41";"0";"0";
"74";"0";"1";"0";"0";"0";"1";"2014-02-16 13:23:05";"2014-02-16 13:23:05";"0";"0";
"75";"0";"1";"0";"0";"0";"1";"2014-02-16 14:02:33";"2014-02-16 14:02:33";"0";"0";
Edited by roamencota (see edit history)
Link to comment
Share on other sites

 

Yes.  Heres an error I got. 

  • When saving the query, only the request type "SELECT" is allowed.

 

 

id_category;id_parent;id_shop_default;level_depth;nleft;nright;active;date_add;date_upd;position;is_root_category;
"1";"0";"1";"0";"1";"10";"1";"2013-04-29 10:47:45";"2013-04-29 10:47:45";"0";"0";
"25";"47";"1";"2";"3";"12";"1";"2013-12-27 20:35:44";"2014-02-14 13:52:51";"1";"0";
"34";"25";"1";"3";"4";"11";"1";"2014-02-12 14:27:20";"2014-02-12 14:27:20";"0";"0";
"57";"1";"1";"1";"2";"9";"1";"2014-02-16 09:53:58";"2014-02-16 09:53:58";"0";"1";
"64";"58";"1";"2";"11";"12";"1";"2014-02-16 10:02:25";"2014-02-16 10:02:25";"0";"0";
"65";"58";"1";"2";"13";"14";"1";"2014-02-16 10:02:39";"2014-02-16 10:02:39";"0";"0";
"66";"59";"1";"2";"11";"12";"1";"2014-02-16 10:12:56";"2014-02-16 10:12:56";"0";"0";
"67";"59";"1";"2";"13";"14";"1";"2014-02-16 10:13:03";"2014-02-16 10:13:03";"0";"0";
"68";"57";"1";"2";"3";"4";"1";"2014-02-16 12:27:51";"2014-02-16 12:27:51";"0";"0";
"69";"57";"1";"2";"7";"8";"1";"2014-02-16 12:28:09";"2014-02-16 12:28:09";"0";"0";
"70";"57";"1";"2";"5";"6";"1";"2014-02-16 12:28:15";"2014-02-16 12:28:15";"0";"0";
"71";"0";"1";"0";"0";"0";"1";"2014-02-16 13:21:33";"2014-02-16 13:21:33";"0";"0";
"72";"0";"1";"0";"0";"0";"1";"2014-02-16 13:21:56";"2014-02-16 13:21:56";"0";"0";
"73";"0";"1";"0";"0";"0";"1";"2014-02-16 13:22:41";"2014-02-16 13:22:41";"0";"0";
"74";"0";"1";"0";"0";"0";"1";"2014-02-16 13:23:05";"2014-02-16 13:23:05";"0";"0";
"75";"0";"1";"0";"0";"0";"1";"2014-02-16 14:02:33";"2014-02-16 14:02:33";"0";"0";

 

Why are the parent ID's getting messed up?  This kind of ruined my whole Store, I have to put in another 20-40 hours to recategorize everything.  :-(

Link to comment
Share on other sites

Hi nickelus,

 

I checked the database, and found out that there is indeed a problem with the category. Somehow the parent of the edited category was it's own child. So we had a category whose child was it's parent.... creating a mess.

A

|__B

   |__A

      |__B... etc

 

Fixed by changing the id_parent of the edited category in the database to the ID of category 'home'. then everything worked again.

 

pascal

 

 

how did you edit the id_parent of the category?  also is there  anyway to undelete categories?  I deleted my original home which was attached to a few modules and now I am having trouble fixing it. 

Link to comment
Share on other sites

Hi roamencota,

 

Indeed, your categories are messed up. There are some parent_id's that don't exist (anymore), and some are connected to the root, instead of the 'home' category....

id_category;	id_parent;	
"1";			"0";		
"25";			"47";		
"34";			"25";		
"57";			"1";		
"64";			"58";		
"65";			"58";		
"66";			"59";		
"67";			"59";		
"68";			"57";		
"69";			"57";		
"70";			"57";		
"71";			"0";		
"72";			"0";		
"73";			"0";		
"74";			"0";		
"75";			"0";		

As you can see, id_category 47, 58 and 59 don't exist anymore, but are still used as parent-id. Parent-id "0" are used for id_category "71"-"75", which seems incorrect. Actually, the "home" category is normally with id_category = "2", but indeed seems to be missing in your table. Maybe we need to add the home category first, and then use "2" instead of the "0" for id_parent.

 

 

You can edit the id_parent directly in a database editor, like phpMyAdmin or so. Make sure you make backups before you edit anything, though. An error is easily made...

You can also directly create categories here, but this is more difficult, as you have to add values to more tables: See the current values in all ps_category_XXX tables (like ps_category_lang, ps_category_shop, ps_category_group, for examples.

 

 

If you want me to have a look at the tables, then I need access to your database. Maybe cPanel access is easiest. If you want that, please backup all the tables and then Email me the access info (URL to login to cPanel/database, login name and password.) Email address: [email protected]

N.B. DON'T post this login info here :-)

 

 

I saw more problems in the forum with categories lately. There really seems to be some flaw in the latest versions (1.5.6.1+   I think). I hope the PrestaShop team takes notice!

 

pascal.

Link to comment
Share on other sites

  • 2 months later...

the solution  http://www.prestashop.com/forums/topic/315913-prestashop-16-categorys-bo-after-upgrade-bug-fix/

 

 

i have run automated upgraded on prestashop 1.5.6.2 and upgraded it to 1.6.0.5 today / night.

 

after upgrade there was no category shown in BO " parent category"  where you collapse / expand category tree.

 

"root" in SQL database, it missing two lines.

 

"category_group" > id_category 1, id_group 0

"category_shop" >  id_category 1 id_shop 1 position 1

 

now it is possible to edit category’s and root folder in parent category window shows up and it is possible to collapse and expand ..

 

hope that helps someone already have upgraded :)

 

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...