Solved: Save failed MenusTableMenu getNode Failed problem

灰暗的星星灰暗的星星灰暗的星星灰暗的星星灰暗的星星
 
分类:技术文章

If you are seeing a "Save failed with the following error: MenusTableMenu::_getNode(1, ) failed." message when creating a new menu item or edit an existing menu item in Joomla, it usually means there is a record missing from your menu table. Here's how to fix that.

Note: before you make any edits, it's always a good idea to have a verified backup available.

Access your database using PhpMyAdmin or whatever database tool you like. Next, add the record back in using the following statement. Change the database table name prefix to match your own.

INSERT INTO prefix_menu (`id` ,`menutype` ,`title` ,`alias` ,`note` ,`path` ,`link` ,`type` ,`published` ,`parent_id` ,`level` ,`component_id` ,`checked_out` ,`checked_out_time` ,`browserNav` ,`access` ,`img` ,`template_style_id` ,`params` ,`lft` ,`rgt` ,`home` ,`language` ,`client_id` ) 
VALUES ( "1", "", "Menu_Item_Root", "root", "", "", "", "", "1", "0", "0", "0", "0", "0000-00-00 00:00:00", "0", "0", "", "0", "", "0", "0", "0", "*", "0")

 Next, we need to rebuild the menus. To do that, in the administrator panel of your Joomla website, navigate to Menus > Menu Manager. On the Menu Manager screen, select all menus and click on the buttton 'Rebuild'. This step fixes the positioning of the menu record you added in step one.

评论:出现这样错误提示:MenusTableMenu::getRootId。

这个方法也可以。