Papasmur Posted January 11, 2016 Share Posted January 11, 2016 (edited) Hello, I am unable to delete categories in the back office and before I start tinkering with files uploaded on the server I might just aswell ask here. When i select a category and deletes me, it just throws me in the main categories menu and does nothing when I check, if anything happened. I can enable and disable them without any problems, I am just unable to delete them. Please help Edited January 11, 2016 by Papasmur (see edit history) Link to comment Share on other sites More sharing options...
gabdara Posted January 11, 2016 Share Posted January 11, 2016 Enable development mode to see if any errors appear when you try to delete a category. Link to comment Share on other sites More sharing options...
Papasmur Posted January 11, 2016 Author Share Posted January 11, 2016 Either I am stupid or no error message shows up I might be doing something wrong, I don't think so though. If it matters I tried doing it through filezilla and it changed from false to true for sure Link to comment Share on other sites More sharing options...
gabdara Posted January 11, 2016 Share Posted January 11, 2016 If there's no error I don't have any idea what may cause this. Try a hardcoded delete like this. See the number id of one category that you want to delete, edit file YOUR_PRESTA/controllers/admin/AdminCategoriesController.php and at the beginning of __construct() function add: $catdel = new Category(999); $catdel->delete(); Make sure in the code above you replace 999 with the id of category you want to delete. After that refresh the categories page and check if the category was deleted or not. Link to comment Share on other sites More sharing options...
Papasmur Posted January 12, 2016 Author Share Posted January 12, 2016 I don't want to be such a pain in the a**, but I am quite new to this and not sure how everything works. I located the said file and found 2 parts with ''_construct'' and am not sure where should i paste the code. screenshots of locations: https://gyazo.com/8d4e632568df906a098d3dfc34977087 https://gyazo.com/5a32908c80640d376b62c58297d31907 I really appreciate all the help Link to comment Share on other sites More sharing options...
gabdara Posted January 19, 2016 Share Posted January 19, 2016 In the first image you've posted add my code above $this->bootstrap = true; Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now