Page 5 of 5

Re: Solution for error: JTableMenu: :_getNode

Posted: Mon Jun 02, 2014 7:51 am
by mojtaba_g79
Lieven Borms wrote:Because some people are struggling with the phpMyAdmin part. I simplified the first part of the solution.
Below you can find the renewed solution.

To solve this problem please enter the following two steps.
1. Add the missing record to the database
Unzip the file ‘slbs.zip’ (attached to this post)
Copy the file ‘slbs.php’ to the root of your domain
Go to www.yourdomain.com/slbs.php (replace ‘yourdomain.com’ with your real domain)
Now you can remove the ‘slbs.php’ file from the root

2. Rebuilding menus
Go to the administrator panel of joomla.
Menus --> MenuManager
Select all menus
Click on the button ‘Rebuild’
(By doing step two, the field ‘rgt’ in the just added record (step one) will get the appropriate value.)
Thanks a lot.

I have updated your code for Joomla 3.2 (off course by your footer name).

Please download the attachment

Re: Solution for error: JTableMenu: :_getNode

Posted: Fri Jun 13, 2014 9:25 pm
by scifivision
I am having the errors as someone else stated when I try to install some components it has the error with building the admin menus and I can't see the component part of it in the backend.

Will this file work for 3.30 & 3.3.1? (the one I am using is 3.30 but I need to migrate another and it's been installed 3.31) And I assume that you need to change database names, etc in the php file just like it was stated to do when you were using the orginal part through php rather than the slbs thing? My old prefix is jos, the new one is joom and the data base (& dbuser) are thejrub4_jmln1

Thank you in advance!

Re: Solution for error: JTableMenu: :_getNode

Posted: Mon Jun 30, 2014 6:27 pm
by thepimster
Thanks Lieven!

Your nearly (!) three year old solution just worked fine for me during my upgrade from 2.5.19 to 3.3.1.

Good luck in tomorrow's FIFA match against the USA!

Re: Solution for error: JTableMenu: :_getNode

Posted: Wed Jul 16, 2014 7:14 am
by sanal_eficaz
Thanks..alot .. its working fine in joomla 3.1.5 . i have removed ordering field from menu structure .. then run via domain .. working fine now

Thanks
Vince

Re: Solution for error: JTableMenu: :_getNode

Posted: Fri Aug 08, 2014 3:57 am
by elbetoctes
Muchas gracias!!, Funciona para joomla 3.3.1.

Re: Solution for error: JTableMenu: :_getNode

Posted: Sat Aug 09, 2014 8:42 pm
by rutin
Is this corrected in higher versions?

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Aug 28, 2014 1:36 am
by rowbygoren
I tried to modify this comment, but instead it made a duplicate. So ignore it and look at my next post. :eek:

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Aug 28, 2014 1:43 am
by rowbygoren
In case the above thread doesn't work for you.... (and I hope it does work)....

If you are using Joomla 3.3.3 look at this thread.

http://forum.joomla.org/viewtopic.php?f ... 9#p3212189

....Rowby

Re: Solution for error: JTableMenu: :_getNode

Posted: Wed Sep 10, 2014 8:05 pm
by Protonotarios
Thanks both Lieven Borms and mojtaba_g79! You just saved my life!
Joomla 3.2

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 23, 2014 8:16 am
by Chamira Athauda
I had migrated a Joomla 2.5.17 site in to Joomla 3.3.3 using SP Transfer.

I have since updated to Joomla 3.3.6 and I discovered this bug when I deleted some of the old menus.

Thank you very much Lieven Borms, mojtaba_g79 and sovainfo (on this thread: http://forum.joomla.org/viewtopic.php?f ... 9#p3212189) for investigating and finding a solution to this bug.

I just ran the suggested code:

Code: Select all

INSERT INTO `[your-joomla-table-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, 49, 0, '*', 0);
And rebuilt the menus. All is OK!

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Nov 06, 2014 7:26 pm
by lorenzo12
Lieven Borms wrote:Because some people are struggling with the phpMyAdmin part. I simplified the first part of the solution.
Below you can find the renewed solution.

To solve this problem please enter the following two steps.
1. Add the missing record to the database
Unzip the file ‘slbs.zip’ (attached to this post)
Copy the file ‘slbs.php’ to the root of your domain
Go to www.yourdomain.com/slbs.php (replace ‘yourdomain.com’ with your real domain)
Now you can remove the ‘slbs.php’ file from the root

2. Rebuilding menus
Go to the administrator panel of joomla.
Menus --> MenuManager
Select all menus
Click on the button ‘Rebuild’
(By doing step two, the field ‘rgt’ in the just added record (step one) will get the appropriate value.)

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Nov 06, 2014 7:32 pm
by joyteam
I got mine in but I do not know how to solve such a problem marvelgames.org. What do I need for a solution on this page.

Re: Solution for error: JTableMenu: :_getNode

Posted: Fri Nov 07, 2014 3:11 am
by jcalvert
Thank you Lieven Borms, the fix also worked for me upgrading from J1.5 to J2.5.

It's strange though, because I've done many of these upgrades and never ran into this problem of rebuild menus not working. This problem may also have caused another symptom I saw, which was the Components menu becoming corrupted after the upgrade.

best,
JC

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Dec 09, 2014 10:04 am
by fxygrl
Errors:
Having used SP to upgrade from a J1.7 to a J3.x my menus wouldn't reorder or allow me to add new menu items.

When I clicked rebuild: On the top level of Menu Manager, it went to a blank page.
On an individual menu, when I clicked rebuild, it showed a message that it failed.

Solution, error and fix:
However, I used this forum thread, and the slbs.php file to solve the problem. Massive thanks to the author!
It didn't quite work but provided a helpful SQL error.
The database table jos_menu was missed the 13th column named ‘ordering’ and thus Joomla failed to rebuild. I added the column named ordering (INT, 10) in the correct place (via the PHPMyAdmin window). Ran the slbs.php file downloaded from the forum. Rebuilt the menus, and IT WORKED!

Thanks so much to everyone on here for your helpful posts :) Just saved me 20+ hours of work to rebuild this large site!!

Re: Solution for error: JTableMenu: :_getNode

Posted: Wed Dec 31, 2014 9:26 am
by dc03kks
Just to let u know guys for joomla 3.3.x there is no field ordering so the code that i used and worked like a charm is this

INSERT INTO `DATABASE_NAME`.`jos_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')

Happy new year and keep up the good work!!... awesome!! yea!!!

Re: Solution for error: JTableMenu: :_getNode

Posted: Sun Jan 11, 2015 9:24 pm
by jooomler13
mojtaba_g79 wrote:
Lieven Borms wrote:Because some people are struggling with the phpMyAdmin part. I simplified the first part of the solution.
Below you can find the renewed solution.

To solve this problem please enter the following two steps.
1. Add the missing record to the database
Unzip the file ‘slbs.zip’ (attached to this post)
Copy the file ‘slbs.php’ to the root of your domain
Go to http://www.yourdomain.com/slbs.php (replace ‘yourdomain.com’ with your real domain)
Now you can remove the ‘slbs.php’ file from the root

2. Rebuilding menus
Go to the administrator panel of joomla.
Menus --> MenuManager
Select all menus
Click on the button ‘Rebuild’
(By doing step two, the field ‘rgt’ in the just added record (step one) will get the appropriate value.)
Thanks a lot.

I have updated your code for Joomla 3.2 (off course by your footer name).

Please download the attachment
It also works with Joomla!-Version 3.3.6
Big thanks to mojtaba_g79 and Lieven Borms

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jan 20, 2015 11:30 pm
by termino
Where are you obtaining these values? 'parent_id' => $data['parent_id'], 'level' => 1, I definitely question hard coding level to 1 Remember that JTableMenu extends JTableNested so it is essential that you handle the nesting correctly, that is where the lft and rgt come from

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Mar 10, 2015 6:21 pm
by evns
Just wanted to give a quick thanks for the effort put into this problem by everyone. Have had a menu problem on a site for a while now. This solution worked perfectly on the current stable version of Joomla which is 3.4.0.

Thanks!

Re: Solution for error: JTableMenu: :_getNode

Posted: Sun Sep 20, 2015 2:40 am
by webtread
Yeah a big thanks Lieven, mojtaba_g79 and anyone else who assisted in this fix. I just ran across this issue when I deleted a few older menu items after upgrading to Joomla 3.4.4 and mojtaba_g79 updated fix for Joomla 3.2 worked for Joomla 3.4.4 as well. Awesome and thanks again.

Re: Solution for error: JTableMenu: :_getNode

Posted: Fri Oct 23, 2015 7:13 pm
by GESign77
This was the solution for me as well. Thank you!
ratweb wrote:I am running 3.1, clean install as of a week ago and the same thing is happening to me.. i tried the slbs.php and get an error of "Invalid query: Unknown column 'ordering' in 'field list'" any help would greatly appreciated!

I get this error when i try rebuild Fatal error: Call to undefined method MenusModelItem::getMessage() in /MY SITE/administrator/components/com_menus/controllers/menus.php on line 111

i have disabled all SEF, disabled htaccess.. sttill same error.. any ideas? Im really not looking forward to rebuilding the site, esp if unstable..

Here is the error when i save a menu item, i can create a top menu in menu manager just nothing under it. Replaced path with MY SITE for posting


Warning

Save failed with the following error: exception 'UnexpectedValueException' with message 'MenusTableMenu::_getNode(1, ) failed.' in /MY SITE/libraries/joomla/table/nested.php:1441 Stack trace: #0 /MY SITE/libraries/joomla/table/nested.php(751): JTableNested->_getNode(1) #1 /MY SITE/libraries/legacy/table/menu.php(183): JTableNested->store(false) #2 /MY SITE/administrator/components/com_menus/models/item.php(1231): JTableMenu->store() #3 /MY SITE/administrator/components/com_menus/controllers/item.php(224): MenusModelItem->save(Array) #4 /MY SITE/libraries/legacy/controller/legacy.php(722): MenusControllerItem->save() #5 /MY SITE/administrator/components/com_menus/menus.php(18): JControllerLegacy->execute('apply') #6 /MY SITE/libraries/legacy/component/helper.php(359): require_once('/home/offroadh/...') #7 /MY SITE/libraries/legacy/component/helper.php(339): JComponentHelper::executeComponent('/MY SITE/...') #8 /MY SITE/administrator/includes/application.php(166): JComponentHelper::renderComponent('com_menus') #9 /MY SITE/administrator/index.php(56): JAdministrator->dispatch() #10 {main}

FIXED - WORK AROUND


I restored my site with Akeeba lost and 2 days of work. ugh.. After i compared the structure of the _Menu tables.. seems it lost row 1, even some of the default rows as well. I do not have the time to trace them all however here is the "Should not be an issue for you" fix. It restores the DEFAULT only menu-items such as banners, root menu, etc.

Step 1. Download the attached file PREFIX_menu.sql, its an export of a clean 3.1 install of the _menu table.

Step 2. Open the file PREFIX_menu.sql in notepad or equivalent, do not use a program that inserts carriage returns, only raw format, i have marked where you need to edit the database name and prefix to match your server. Save the file and exit

Step 3. Open your PHPMyadmin or MySQL application, go to the table _menu, once open click on Import "PREFIX_menu.sql" this should restore the Default Joomla! 3.1 menu structure, but not modify any changes you have made. i don't use any of the the default anything so you may need to tweak your site a little after if you do. But it saves a lot of time just having to change a few things than rebuilding everything.

Your menu structure, rebuild and adding new menus should be no issue again.. I do not know why the menu structure in the DB get whacked, seems like an ongoing issue, im not a programmer but this really should be looked into.

This as is, i dont know if it will fix your problem directly, it did for me. :D

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Dec 15, 2015 8:19 pm
by tlynnec
dc03kks wrote:Just to let u know guys for joomla 3.3.x there is no field ordering so the code that i used and worked like a charm is this

INSERT INTO `DATABASE_NAME`.`jos_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')

Happy new year and keep up the good work!!... awesome!! yea!!!
This worked perfectly for me in 3.4.6. Thanks!

FYI, rebuilding the menus did not fix my admin components menu, but when i reinstalled and/or updated each component, they were successfully re-added to the admin components menu without erroring out as they had previously.

Re: Solution for error: JTableMenu: :_getNode

Posted: Fri Jan 08, 2016 9:57 pm
by efex
Lieven Borms wrote:Because some people are struggling with the phpMyAdmin part. I simplified the first part of the solution.
Below you can find the renewed solution.

To solve this problem please enter the following two steps.
1. Add the missing record to the database
Unzip the file ‘slbs.zip’ (attached to this post)
Copy the file ‘slbs.php’ to the root of your domain
Go to http://www.yourdomain.com/slbs.php (replace ‘yourdomain.com’ with your real domain)
Now you can remove the ‘slbs.php’ file from the root

2. Rebuilding menus
Go to the administrator panel of joomla.
Menus --> MenuManager
Select all menus
Click on the button ‘Rebuild’
(By doing step two, the field ‘rgt’ in the just added record (step one) will get the appropriate value.)

Great job Lieven! Saved me a lot of time. Thank you very much!

Works well with J! 3.4.8

Rgds
Cosmin

Re: Solution for error: JTableMenu: :_getNode

Posted: Wed Mar 30, 2016 1:59 pm
by senoworks
Big thanx from Bosnia, it works for newest joomla also !!!

Re: Solution for error: JTableMenu: :_getNode

Posted: Sun May 15, 2016 7:37 am
by kbouk
Thanks Lieven Borms, it worked also on Joomla 3.5.1 .
StefanKW wrote:
Lieven Borms wrote:Because some people are struggling with the phpMyAdmin part. I simplified the first part of the solution.
Below you can find the renewed solution.

To solve this problem please enter the following two steps.
1. Add the missing record to the database
Unzip the file ‘slbs.zip’ (attached to this post)
Copy the file ‘slbs.php’ to the root of your domain
Go to http://www.yourdomain.com/slbs.php (replace ‘yourdomain.com’ with your real domain)
Now you can remove the ‘slbs.php’ file from the root

2. Rebuilding menus
Go to the administrator panel of joomla.
Menus --> MenuManager
Select all menus
Click on the button ‘Rebuild’
(By doing step two, the field ‘rgt’ in the just added record (step one) will get the appropriate value.)
Merci beaucoup !!

Re: Solution for error: JTableMenu: :_getNode

Posted: Sat Jun 25, 2016 2:58 am
by tracey-ppd
tlynnec wrote:
dc03kks wrote:Just to let u know guys for joomla 3.3.x there is no field ordering so the code that i used and worked like a charm is this

INSERT INTO `DATABASE_NAME`.`jos_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')

Happy new year and keep up the good work!!... awesome!! yea!!!
This worked perfectly for me in 3.4.6. Thanks!

FYI, rebuilding the menus did not fix my admin components menu, but when i reinstalled and/or updated each component, they were successfully re-added to the admin components menu without erroring out as they had previously.
Thank you. This worked for me too :)

Re: Solution for error: JTableMenu: :_getNode

Posted: Fri May 26, 2017 2:19 pm
by escozul
I am so thankful!

This also worked perfectly for joomla 3.7.2! (Also worked on another website for joomla 3.6.9)

I used the code mentioned just above:

Code: Select all

INSERT INTO `DATABASE_NAME`.`jos_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')
Thank you for being here and helping me out people! I really appreciate all the help!

Re: Solution for error: JTableMenu: :_getNode

Posted: Fri Aug 04, 2017 12:55 am
by hbman23
Registered to get your php file, but more so to say THANK YOU or the fix! Amazing. Saved me tons of work! Thanks so much!