RESOLVED: adding a menu item in Joomla 3.0.2 fatal error - Joomla! Forum - community, help and support
after trying add menu item menu in backend of joomla 3.0 failed due duplicate alias accessing menu section of backend no longer works. menu items disappear frontend. trying add further menu items results in fatal error
deleting erroneous menu item in database returns frontend menu items, backend still not working.
this method highlighted in above error: ** highlighting row
does have fix?
the docs article linked in method details non-existent.
notes:
this on iis on localhost dev purposes
set memory limit 256m , 512m no change.
changed several other time/size limit settings in php.ini still no joy
restarted server.
no cookies
rebuilt menus , modules - fixes front end display - backend still broken.
current php ini settings:
db row content in #_menu table:
if example alias 'abc123' every other record in #_menu table has path field updated abc123/existing-alias, whilst path remains empty on new row added trying add menu item alias abc123, row has id of 0.
code: select all
php fatal error: allowed memory size of 134217728 bytes exhausted (tried allocate 36324 bytes) in \libraries\joomla\table\nested.php on line 1251deleting erroneous menu item in database returns frontend menu items, backend still not working.
this method highlighted in above error: ** highlighting row
code: select all
/**
* method recursively rebuild whole nested set tree.
*
* @param integer $parentid root of tree rebuild.
* @param integer $leftid left id start in building tree.
* @param integer $level the level assign current nodes.
* @param string $path path current nodes.
*
* @return integer 1 + value of root rgt on success, false on failure
*
* @link http://docs.joomla.org/jtablenested/rebuild
* @since 11.1
* @throws runtimeexception on database error.
*/
public function rebuild($parentid = null, $leftid = 0, $level = 0, $path = '')
{
// if no parent provided, try find it.
if ($parentid === null)
{
// root item.
$parentid = $this->getrootid();
if ($parentid === false)
{
return false;
}
}
// build structure of recursive query.
if (!isset($this->_cache['rebuild.sql']))
{
$query = $this->_db->getquery(true);
$query->select($this->_tbl_key . ', alias')
->from($this->_tbl)
->where('parent_id = %d');
// if table has ordering field, use ordering.
if (property_exists($this, 'ordering'))
{
$query->order('parent_id, ordering, lft');
}
else
{
$query->order('parent_id, lft');
}
$this->_cache['rebuild.sql'] = (string) $query;
}
// make shortcut database object.
// assemble query find children of node.
$this->_db->setquery(sprintf($this->_cache['rebuild.sql'], (int) $parentid));
$children = $this->_db->loadobjectlist();
// right value of node left value + 1
$rightid = $leftid + 1;
// execute function recursively on children
foreach ($children $node)
{
/*
* $rightid current right value, incremented on recursion return.
* increment level children.
* add item's alias path (but avoid leading /)
*/
****
$rightid = $this->rebuild($node->{$this->_tbl_key}, $rightid, $level + 1, $path . (empty($path) ? '' : '/') . $node->alias);
****
// if there update failure, return false break out of recursion.
if ($rightid === false)
{
return false;
}
}
// we've got left value, , we've processed
// children of node know right value.
$query = $this->_db->getquery(true);
$query->update($this->_tbl)
->set('lft = ' . (int) $leftid)
->set('rgt = ' . (int) $rightid)
->set('level = ' . (int) $level)
->set('path = ' . $this->_db->quote($path))
->where($this->_tbl_key . ' = ' . (int) $parentid);
$this->_db->setquery($query)->execute();
// return right value of node + 1.
return $rightid + 1;
}does have fix?
the docs article linked in method details non-existent.
notes:
this on iis on localhost dev purposes
set memory limit 256m , 512m no change.
changed several other time/size limit settings in php.ini still no joy
restarted server.
no cookies
rebuilt menus , modules - fixes front end display - backend still broken.
current php ini settings:
code: select all
max_execution_time: 3000 3000
max_file_uploads: 200 200
max_input_nesting_level 64 64
max_input_time 600 600
max_input_vars 1000 1000
memory_limit -1 512mdb row content in #_menu table:
code: select all
'0', 'menutype', 'title', 'alias', '', '', '', 'separator', '1', '1', '1', '0', '0', '0000-00-00 00:00:00', '0', '1', '', '0', '{\"menu_image\":\"\",\"menu_text\":1}', '223', '224', '0', '*', '0'if example alias 'abc123' every other record in #_menu table has path field updated abc123/existing-alias, whilst path remains empty on new row added trying add menu item alias abc123, row has id of 0.
if haven't already, maybe try emptying trash make sure there no duplicate alias items , use rebuild option?
neil.
neil.
Comments
Post a Comment