Solution for error: JTableMenu: :_getNode

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
mojtaba_g79
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Mon Oct 02, 2006 8:34 am

Re: Solution for error: JTableMenu: :_getNode

Post by mojtaba_g79 » Mon Jun 02, 2014 7:51 am

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
You do not have the required permissions to view the files attached to this post.

scifivision
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 126
Joined: Mon Jun 01, 2009 5:24 am

Re: Solution for error: JTableMenu: :_getNode

Post by scifivision » Fri Jun 13, 2014 9:25 pm

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!

thepimster
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Mar 22, 2007 11:02 pm

Re: Solution for error: JTableMenu: :_getNode

Post by thepimster » Mon Jun 30, 2014 6:27 pm

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!

sanal_eficaz
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Jul 02, 2014 7:31 am

Re: Solution for error: JTableMenu: :_getNode

Post by sanal_eficaz » Wed Jul 16, 2014 7:14 am

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

elbetoctes
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Aug 08, 2014 3:46 am

Re: Solution for error: JTableMenu: :_getNode

Post by elbetoctes » Fri Aug 08, 2014 3:57 am

Muchas gracias!!, Funciona para joomla 3.3.1.

rutin
I've been banned!
Posts: 27
Joined: Sat Apr 13, 2013 5:49 am

Re: Solution for error: JTableMenu: :_getNode

Post by rutin » Sat Aug 09, 2014 8:42 pm

Is this corrected in higher versions?

User avatar
rowbygoren
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Wed Jun 19, 2013 1:03 pm
Contact:

Re: Solution for error: JTableMenu: :_getNode

Post by rowbygoren » Thu Aug 28, 2014 1:36 am

I tried to modify this comment, but instead it made a duplicate. So ignore it and look at my next post. :eek:
Last edited by rowbygoren on Thu Aug 28, 2014 1:44 am, edited 1 time in total.

User avatar
rowbygoren
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Wed Jun 19, 2013 1:03 pm
Contact:

Re: Solution for error: JTableMenu: :_getNode

Post by rowbygoren » Thu Aug 28, 2014 1:43 am

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

Protonotarios
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat May 24, 2014 10:32 am
Location: Athens, Greece

Re: Solution for error: JTableMenu: :_getNode

Post by Protonotarios » Wed Sep 10, 2014 8:05 pm

Thanks both Lieven Borms and mojtaba_g79! You just saved my life!
Joomla 3.2

User avatar
Chamira Athauda
Joomla! Explorer
Joomla! Explorer
Posts: 440
Joined: Sat Apr 21, 2012 2:15 am
Location: Sri Lanka
Contact:

Re: Solution for error: JTableMenu: :_getNode

Post by Chamira Athauda » Thu Oct 23, 2014 8:16 am

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!

lorenzo12
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Aug 15, 2011 9:46 pm

Re: Solution for error: JTableMenu: :_getNode

Post by lorenzo12 » Thu Nov 06, 2014 7:26 pm

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.)

joyteam
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Sep 29, 2014 7:56 am

Re: Solution for error: JTableMenu: :_getNode

Post by joyteam » Thu Nov 06, 2014 7:32 pm

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.

User avatar
jcalvert
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 242
Joined: Sun Feb 19, 2006 10:00 am

Re: Solution for error: JTableMenu: :_getNode

Post by jcalvert » Fri Nov 07, 2014 3:11 am

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

fxygrl
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Dec 09, 2014 9:29 am

Re: Solution for error: JTableMenu: :_getNode

Post by fxygrl » Tue Dec 09, 2014 10:04 am

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!!

dc03kks
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Mar 02, 2011 5:49 am

Re: Solution for error: JTableMenu: :_getNode

Post by dc03kks » Wed Dec 31, 2014 9:26 am

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!!!

jooomler13
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Jan 11, 2015 9:08 pm

Re: Solution for error: JTableMenu: :_getNode

Post by jooomler13 » Sun Jan 11, 2015 9:24 pm

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

termino
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Wed Aug 07, 2013 12:20 pm

Re: Solution for error: JTableMenu: :_getNode

Post by termino » Tue Jan 20, 2015 11:30 pm

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

evns
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Mar 10, 2015 5:44 pm

Re: Solution for error: JTableMenu: :_getNode

Post by evns » Tue Mar 10, 2015 6:21 pm

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!

webtread
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Nov 08, 2009 6:35 am

Re: Solution for error: JTableMenu: :_getNode

Post by webtread » Sun Sep 20, 2015 2:40 am

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.

GESign77
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Oct 23, 2015 6:38 pm

Re: Solution for error: JTableMenu: :_getNode

Post by GESign77 » Fri Oct 23, 2015 7:13 pm

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

tlynnec
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Jun 06, 2013 7:19 pm

Re: Solution for error: JTableMenu: :_getNode

Post by tlynnec » Tue Dec 15, 2015 8:19 pm

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.

User avatar
efex
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Jan 15, 2008 6:34 pm
Location: Bucharest
Contact:

Re: Solution for error: JTableMenu: :_getNode

Post by efex » Fri Jan 08, 2016 9:57 pm

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
Let there be Joomla!
... THEN BRUSH YOUR TEETH!
My project:
http://netdent.ro

User avatar
senoworks
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Mon Jan 30, 2006 9:37 am
Location: Travnik, Bosnia and Herzegovina
Contact:

Re: Solution for error: JTableMenu: :_getNode

Post by senoworks » Wed Mar 30, 2016 1:59 pm

Big thanx from Bosnia, it works for newest joomla also !!!
http://www.mediamagazin.info/ - Žuta štampa online

kbouk
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun May 15, 2016 7:16 am

Re: Solution for error: JTableMenu: :_getNode

Post by kbouk » Sun May 15, 2016 7:37 am

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 !!

tracey-ppd
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Jun 25, 2016 2:48 am

Re: Solution for error: JTableMenu: :_getNode

Post by tracey-ppd » Sat Jun 25, 2016 2:58 am

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 :)

escozul
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue May 21, 2013 11:10 am

Re: Solution for error: JTableMenu: :_getNode

Post by escozul » Fri May 26, 2017 2:19 pm

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!

hbman23
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Aug 04, 2017 12:46 am

Re: Solution for error: JTableMenu: :_getNode

Post by hbman23 » Fri Aug 04, 2017 12:55 am

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!


Locked

Return to “Migrating and Upgrading to Joomla! 2.5”