Jump to content

Error 500 on adding categories or products


agriffith

Recommended Posts

Hello,

 

I am a newbie to PrestaShop, and it looks like I screwed up something in my MySQL DB. I cannot figure out how to resolve this issue, and if someone can help (I can pay), I would really appreciate it. Here is what happened:

 

The site was basically ready to go live.

I deleted all of the products and categories that I had been using for testing site functionality so I could start from scratch with new categories (using the Import tool).

I uploaded the CSV containing the product categories (selecting "overwrite existing categories"), and when it imported, it renamed my "Home" category to one of the product categories for some reason.

I read a thread on how to rename the default category back to Home, and I went into the ps_categories_lang table and renamed it.

For some reason now, the back office is showing the "Home" category as a subcategory of itself, and when I try to modify it or add more categories, I get a 500 internal error from the server.

When I try to upload products, I get the same error.

The error log on my server is giving me messages that look like this:

 

[Wed Sep 21 19:19:47 2011] [error] [client 70.88.73.13] File does not exist: /home/sxwuqlzc/public_html/office/sys_cpanel, referer: http://server511.web...f08f8a64f667cb0

[Wed Sep 21 19:19:44 2011] [error] [client 70.88.73.13] File does not exist: /home/sxwuqlzc/public_html/office/sys_cpanel, referer: http://server511.web...f08f8a64f667cb0

[Wed Sep 21 19:17:44 2011] [error] [client 70.88.73.13] File does not exist: /home/sxwuqlzc/public_html/office/sys_cpanel, referer: http://server511.web...480334ee87e4c80

[Wed Sep 21 19:15:08 2011] [error] [client 70.88.73.13] File does not exist: /home/sxwuqlzc/public_html/office/sys_cpanel, referer: http://server511.web...480334ee87e4c80

 

 

Here is what my ps_categories_lang table looks like:

 

post-287924-0-00978600-1316654256_thumb.png

 

This is a very urgent matter, and if anyone can help me resolve this issue I would appreciate it more than you know.

 

Thanks

Austin

Link to comment
Share on other sites

I realize this isnt the answer you are looking for, but to get back to square one.

1. Go into mysql and delete the db, not the user.

2. hit create new database, then go down and attach user to the db, set all privs again. now they are linked again fresh db

2. reupload the install folder, changelog.txt and the 5 readme files.

3. rename the adminxxxxx folder back to admin

4. go to sitename.com/install and reinstall your site.

5. wait till someone responds on sql import or csv import.

 

 

Personally I have never seen the import work. The only way to really do imports is through SQL, I dont think your server likes doing big "writing" sessions via the browser like that. Additionally, if you havent setup the ID's right or the scv correctly, it will cause the 500 server error because on the backend SQL is getting errors and cant function.

Link to comment
Share on other sites

i can give you a quick walk through of how to do it correctly, according to my trial and error, pay attention to each small step. I say that because i kept overlooking a couple of obvious things and it added about 30 minutes to the troubleshooting everytime i did.

 

1. I use excel 2010, 2007 do same thing. In the admin panel go to tools, then import. select categories from drop down box. copy all of the possible categories into excel

2. put each category in the first row along the top, so you can easily know where you are at when putting stuff in.

3. go to your catalogue - delete all of the categories. This will leave the previously existing default of Home which has the ID of 1.

4. the next step, review the data in your excel. the meta items have a limit on characters. Make sure the title doesnt exceed 155 and the description and keywords dont exceed 255. I think title is 155. but you can check the hardway

5. in the ID column of your excel. only use ID #'s one time. they are all unique. make sure that the order of your excel sheet is also in chronological order. if you main 3 categories are dogs, cats, birds. then Home is already "1" give dogs 2, cats, 3, birds 4.

6. your sub categories should be in excel, below these, so that the parent category is made/created first.

7. the "parent category" should be a name, not numeric value. And the name needs to be spelled CORRECT, and matching.

8. if you have a heading that you are not even using, like url writing - just delete the name from your worksheet- no need for it.

9. once your worksheet meets these exact specifications, click "save as" and save as CSV (comma delimited).

10. go back to admin panel / tools / import , upload, go down and hit the drop down box to select what you uploaded.

11. check the box for iso-8859-1 encoded file

12. change field separator from ; to , (comma)

13. change multiple value separator from , to nothing. just a blank - this is ideal for categories but might not be true for product

IMPORTANT

13a. DONT SELECT THE DELETE CATEGORIES BOX

14. hit next step

IMPORTANT

15. put a "1" in the number of spaces to skip

16. MAKE SURE that you look at each drop down box and the name in the box matches the heading underneath. if you noob this up and skip one of the drop down boxes it will fubar everything.

17. If you do fubar everything. Dont try to phpmyadmin edit and remove your mistakes. this takes 5x longer than just deleting the db and starting over.

 

misc hints #1 - using microsoft word you can click on "word count" in the review options, and see how many characters you used(after pasting a cell into word)

 

misc hints #2 - if you have any remnanets in your DB or want to be extra careful as a precaution, give your category ID #'s a number starting at a higher value than 1-5. That way they dont conflict with any leftover chit in your DB from your deleted categories from earlier. I purposely named my category ids in increments of 5 as a precaution. Starting at 20.

Link to comment
Share on other sites

Example of how i category ID'd my stuff.

 

ID - PARENT - NAME

1 - none - home (dont actually make this, i just put this here because it does still exist)

5 - Home - Dog

10 - Home - Cats

15 - Home - Birds

20 - Dog - Food

25 - Cats - Food

30 - Birds - Food

 

This is just an example of how to correctly list ID's and subcategories.

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