Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • jbeauchamp Friend
    #198256

    IIS 7.5
    PHP 5.3.24
    Joomla! 3.2.3
    JA T3 Framework 2.7.1
    ja_purity_ii 2.5.5

    When I try to access ja_purity_ii from Template Manager: Styles I consistently get an out of memory error. I have set the memory_limit to 2G and it still runs out of memory.

    Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 11 bytes) in D:WebSitesperformancesupport2-dev.intel.comcms_v3pluginssystemjat3jat3coreadminutil.php on line 1150

    It dies in a for loop in this function:

    [PHP]
    private function buildMenu($menuType)
    {
    $links = self::loadMenu($menuType);
    $n = count($links);
    $data = array();

    if ($n > 0) {
    $data[] = ‘<li>’;
    $data[] = ‘<input type=”checkbox” class=”menutype” disabled /><label style=”font-weight:bold;”>’. $menuType .'</label>’;
    for ($i = 1; $i < $n; $i++) {
    $value = $links[$i]->value;
    $text = $links[$i]->text;
    $inputbox = ‘<li><input type=”checkbox” class=”pageitem” id=”‘.$value.'” /><label for=”‘. $value .'”>’. $text .'</label>’;
    if ($links[$i]->level > $links[$i-1]->level) {
    $data[] = ‘<ul class=”level’ . $links[$i]->level . ‘”>’;
    $data[] = $inputbox;
    } elseif ($links[$i]->level == $links[$i-1]->level) {
    $data[] = ‘</li>’;
    $data[] .= $inputbox;
    } else {
    $data[] = ‘</li>’;
    for ($j = $links[$i]->level, $m = $links[$i-1]->level; $j < $m; $j++) {
    $data[] = ‘</ul></li>’;
    }
    $data[] = $inputbox;
    }
    }
    $data []= ‘</li>’;
    for ($j = 0, $m = $links[$i-1]->level; $j < $m; $j++) {
    $data []= ‘</ul></li>’ . “n”;
    }
    }

    // Implode data
    $data = implode(“n”, $data);
    return $data;
    }
    [/PHP]

    Ninja Lead Moderator
    #537386

    This bug is strange, please try to switch to default Joomla template first and then turn off any 3rd party extension in your site. Let me know the result.

    jbeauchamp Friend
    #537483

    <em>@Ninja Lead 430227 wrote:</em><blockquote>This bug is strange, please try to switch to default Joomla template first and then turn off any 3rd party extension in your site. Let me know the result.</blockquote>

    I disabled all 3rd party extensions including the JA T3 Framework but left the ja_purity_ii template enabled and the out of memory error didn’t occur. I enabled just the JA T3 Framework plugin and the error returned.

    I think we have something like 300+ menus. The problem is occurring because the framework function loadMenu is using objects for each menu (loadObjectList). I could be wrong but I believe that in this case using an array (loadAssocList) rather than an object is much more efficient. Either way, the interface should only be displaying a subset of the data based limit or filters like some of the other views in Joomla.

    – James

    jbeauchamp Friend
    #537491

    So actually it doesn’t matter whether you use an array or object here. They are both running out of memory for that many menus. It needs to be limited and filtered for the display.

    – James

    Ninja Lead Moderator
    #537540

    How many menu items do you have?

    If there are too many menu items used in JA T3v2 framework, it may cause the issue.

    You can consider to upgrade new T3 framework version, it would be better: http://t3-framework.org/

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  Ninja Lead 10 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum