Isb Posted May 16, 2013 Share Posted May 16, 2013 (edited) Hi all, I have a problem with a menu module. I have this complex structure: and so on. The main problem is the frontend rendering: it prints me Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 9263430 bytes) in /home/wwwsite/isaytest.com/htdocs/stereomuch/modules/wdblocktopmenu/wdblocktopmenu.php on line 573 Now, is it possible that 512mb isn't enough to render a third-level menù? The function getCategory() of this module is almost the same as the getCategory() in the blocktopmenu module. This is the code: private function getCategory($id_category, $id_lang = false, $id_shop = false) { $id_lang = $id_lang ? (int) $id_lang : (int) Context::getContext()->language->id; $category = new Category((int) $id_category, (int) $id_lang); if ($category->level_depth > 1) $category_link = $category->getLink(); else $category_link = $this->context->link->getPageLink('index'); if (is_null($category->id)) return; $children = Category::getChildren((int) $id_category, (int) $id_lang, true, (int) $id_shop); $selected = ($this->page_name == 'category' && ((int) Tools::getValue('id_category') == $id_category)) ? ' class="sfHoverForce"' : ''; $is_intersected = array_intersect($category->getGroups(), $this->user_groups); // filter the categories that the user is allowed to see and browse if (!empty($is_intersected)) { if (count($children)) { $this->_menu .= '<li ' . $selected . ' class="parent">'; } else { $this->_menu .= '<li ' . $selected . '>'; } $this->_menu .= '<a href="' . $category_link . '">' . $category->name . '</a>'; $parent = 'parent'; if (count($children)) { $this->_menu .= '<ul>'; foreach ($children as $child) $this->getCategory((int) $child['id_category'], (int) $id_lang, (int) $child['id_shop']); $this->_menu .= '</ul>'; } $this->_menu .= '</li>'; } } Edited May 16, 2013 by Isb (see edit history) Link to comment Share on other sites More sharing options...
Isb Posted May 20, 2013 Author Share Posted May 20, 2013 No one can help me? Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted May 21, 2013 Share Posted May 21, 2013 hi try to increase the memory limit in php.ini the default may be 32mb try to increase it to 64mb are more.surely you will get it. the file php.ini is in your domain. Link to comment Share on other sites More sharing options...
Isb Posted May 21, 2013 Author Share Posted May 21, 2013 hi try to increase the memory limit in php.ini the default may be 32mb try to increase it to 64mb are more.surely you will get it. the file php.ini is in your domain. Hi Karthik, like i said the actual memory limit is 512mb, not 64 or 32mb. I find very absurd that a third level menù require more than 512mb of memory to be rendered. Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted May 23, 2013 Share Posted May 23, 2013 have you tried for 1024mb? how many categories you have? Link to comment Share on other sites More sharing options...
Isb Posted May 24, 2013 Author Share Posted May 24, 2013 have you tried for 1024mb? how many categories you have? I can't go further 512 MB ( Host limit ). Hovewer look at the first post, where there is an image of all categories 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