kevinberben Posted October 14, 2017 Share Posted October 14, 2017 (edited) Hello, I try to use the Regenerate Category Module, but I have this error message : Fatal error: Allowed memory size of 1342177280 bytes exhausted (tried to allocate 262144 bytes) in /home/clients/0e92a284cc2f72d4c65f0ef91cf33c87/web/classes/Category.php on line 431 [PrestaShop] Fatal error in module file :/home/clients/0e92a284cc2f72d4c65f0ef91cf33c87/web/classes/Category.php:Allowed memory size of 1342177280 bytes exhausted (tried to allocate 262144 bytes) I try to unlock the server limit (My hosting is Infomaniak.com). I also try to increase the limite in config.inc.php. But it doesn't work. Sorry for my bad english... Can someone help me? Thanks, Kevin Edited October 31, 2017 by kevinberben (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted October 15, 2017 Share Posted October 15, 2017 How many categories do you have in your store? Link to comment Share on other sites More sharing options...
kevinberben Posted October 30, 2017 Author Share Posted October 30, 2017 On 15/10/2017 at 2:40 PM, bellini13 said: How many categories do you have in your store? +- 50 Link to comment Share on other sites More sharing options...
kevinberben Posted October 30, 2017 Author Share Posted October 30, 2017 And now another problem. I use this : Db::getInstance()->execute('UPDATE `ps_category` SET `nleft`=0,`nright`=0 WHERE 1'); Category::regenerateEntireNtree(); Now each nleft and Nrights are on 0. But the catagory regeneration does not work. I try to use the Regenerate Category Tree module. When I regenerate, it does not work too. Nothing change in the database and no error message. Maybe a problem in my pq_category table? Can someone help me? Thanks, Kev Link to comment Share on other sites More sharing options...
kevinberben Posted October 31, 2017 Author Share Posted October 31, 2017 Up :-) Someone can help me? Link to comment Share on other sites More sharing options...
kevinberben Posted October 31, 2017 Author Share Posted October 31, 2017 SOLVED! The problem was in the regenerateEntireNtree() function that works with a condition. In ps_category > The root category must be 0. In my table, it was 1. So I edit the function like this (in classes/category.php) (line 421 for me) if (isset($categories_array[0]) && $categories_array[1]['subcategories']) and launch the category tree regenerator module. It works fine. My PS version is 1.6. Link to comment Share on other sites More sharing options...
Blue Bear Posted March 15, 2021 Share Posted March 15, 2021 Hi, Does someone have more specific details about that operation? I need to regenerate my categories tree on my prestashop 1.7.5.2 but I don't understand where I should input Db::getInstance()->execute('UPDATE `ps_category` SET `nleft`=0,`nright`=0 WHERE 1'); Category::regenerateEntireNtree(); or even just Category::regenerateEntireNtree(); I've put into a random module php file and call the url but nothing happen. Best regards, Clément 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