Page 1 of 5

Solution for error: JTableMenu: :_getNode

Posted: Fri Jul 01, 2011 11:58 am
by Lieven Borms
Recently I upgraded my joomla 1.5 to joomla 1.6 with jupgrade.
Initially everything went very well. All contacts, articles,… were perfectly transferred. The menus were also transferred, because they were in a different order as the original, I decide to remove the existing menu and create a new one.

Now, when I tried to create a new menu item, I got the following error:
Save failed with the following error: JTableMenu: :_getNode Failed –

After a long search on internet I couldn’t find a solution. It seems that it’s a familiar problem for people that upgraded their joomla from 1.5 to 1.6.

Some people say that recreating the whole site in joomla 1.6 is the only solution. Since my site contains many articles, contacts,… , I couldn’t accept this solution. So I went looking for a better solution by myself.

After upgrading to 1.6, it’s possible to add menu items to any menu. When items are removed from the transferred menu, it’s no longer possible to add new items. So I’ll get the error as described above.

After removing a menu item, I noticed that a record has disappeard in the table ‘j16_menu’ (record with id = ‘1’). This record is essential for the functioning of the menus.


To solve this problem please enter the following two steps.
1. Add the missing record to the database
Log in to phpmyadmin and execute the following statement
INSERT INTO `DATABASE_NAME`.`j16_menu` (`id` ,`menutype` ,`title` ,`alias` ,`note` ,`path` ,`link` ,`type` ,`published` ,`parent_id` ,`level` ,`component_id` ,`ordering` ,`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', '0', '0000-00-00 00:00:00', '0', '0', '', '0', '', '0', '0', '0', '*', '0')

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


I’ve tested this solution several times and each time with a perfectly functioning result.

Hopefully this will help many people. I’ve noticed that many joomla users over the whole world having this problem and still have no solution found.

Kind regards,

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 12, 2011 1:23 pm
by Afrobent
Thankyou for your solution to this problem I've also stumbled upon.
However, being a complete beginner in the field of databases and programming, how exactcly do I execute the first step of your solution? I've downloaded a program called Wampserver, that uses myphpadmin, but where do I go from here?
Regards - Anders

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 12, 2011 2:07 pm
by Lieven Borms
Wampserver is a very good program, I use it also.

This is all you need to do in step 1
1. Open “phpmyadmin” (Wampserver: quick button or http://localhost/phpmyadmin).
2. Click on the tab ‘SQL’
3. Copy the query and paste it in the textbox.
4. Edit your “DATABASE_NAME” in the query
5. Click on the button “Go”

I added a print screen (database name ‘joomla’ in my case)

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 12, 2011 2:29 pm
by Afrobent
I poked around the administrator site and found myphpadmin in cloud control. I upgraded my 'demo' account to 'mini' account to enable this feature.

In myphpadmin, I insert the code in the query-window and insert the name of my database: druensve

However I get this error message: #1146 - Table 'druensve.j16_menu' doesn't exist

I believe I did everything correctly.

In the "Databases"-tab, however beneath "Create new database" it says No Privileges?

I am not accessing my database from Wampserver, but from the administrator site - is that a problem?
In Wampserver, I don't know exactly how to download my 'druensve' database to my local computer.
EDIT: I accomplished this. The same error-message occurs when I try to insert the code.


Thank you for the help so far!! :-)

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 12, 2011 2:52 pm
by Lieven Borms
In a normal Joomla 1.5 installation the table names are starting with the prefix ‘jos_’.
When you migrate from 1.5 to 1.6, the ‘jos_’ tables are copied for Joomla 1.6. The prefix of the new tables, for the Joomla 1.6 installation, is normally ‘j16_’ (in later versions of jupgrade you can adjust it). So when you do this step these tables already exist.

If you database name is “druensve” and the prefix is “j16_” then you need to have ‘druensve’.’j16_menu’ instead of ‘druensve.j16_menu'. (‘database_name’.’table_name’)

Below your customized query. Normally it should work with this. (If the prefix is ‘j16_’)
INSERT INTO `druensve`.`j16_menu` (`id` ,`menutype` ,`title` ,`alias` ,`note` ,`path` ,`link` ,`type` ,`published` ,`parent_id` ,`level` ,`component_id` ,`ordering` ,`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', '0', '0000-00-00 00:00:00', '0', '0', '', '0', '', '0', '0', '0', '*', '0')

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 12, 2011 2:58 pm
by Afrobent
The prefix for all the tables in my case are "vlo_" - I just inserted this into the code, and the problem with creating new menu items was solved, as far as I can tell.
Amazing!
Thank you for the guidance!

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 12, 2011 3:26 pm
by Lieven Borms
You're welcome. I'm glad that I could help you.
On this forum, I found several times a solution for my problems.

For this JTableMenu: :_getNode error I couldn’t find a solution and created one by myself.
This solution is much better than recreating the whole site in Joomla 1.6. So enjoy.

Kind regards

Re: Solution for error: JTableMenu: :_getNode

Posted: Mon Jul 25, 2011 11:11 pm
by smarterwebs
Hi
I have exactly the same problem
except that I am using Joomla 1.7

Cant get your solution to function

If you have any suggestions I would be grateful

Thanks
Marc

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 26, 2011 1:38 pm
by konczal
Is there a mysql command-line equivalent for the phpAdmin command:

INSERT INTO `DATABASE_NAME`.`j16_menu` (`id` ,`menutype` ,`title` ,`alias` ,`note` ,`path` ,`link` ,`type` ,`published` ,`parent_id` ,`level` ,`component_id` ,`ordering` ,`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', '0', '0000-00-00 00:00:00', '0', '0', '', '0', '', '0', '0', '0', '*', '0')

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 26, 2011 2:16 pm
by smarterwebs
Thank you sooooooo much for this, I'm using Joomla 1.7 - It works perfectly in php MyAdmin, once you have adapted (the Database Name to yours and [J16] to your database prefix).
This will save your bacon ......

I am indebited ..............

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Jul 26, 2011 3:24 pm
by Lieven Borms
It’s possible to use the query in mysql command-line.
When you are logged in to the mysql command-line you can paste the query. (Don’t forget to edit the database name and prefix)

As attachment you can find a print screen with wampserver in command-line.

Kind regards

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Jul 28, 2011 9:32 am
by -ine
I just registered ... to be able to say thanks :-)
you really saved my day.

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Jul 28, 2011 12:50 pm
by konczal
Thanks for the response, Lieven Borms - it worked!

Re: Solution for error: JTableMenu: :_getNode

Posted: Sun Aug 07, 2011 9:33 pm
by Boomzoon
Thank you. Strange error but this solution worked for me too.

Re: Solution for error: JTableMenu: :_getNode

Posted: Sat Aug 13, 2011 9:26 am
by giovannino
Thanks a lot for your hints.
A lot of time after your post it's still helpful.
You saved me an additional.... headache !
Giovannino

Re: Solution for error: JTableMenu: :_getNode

Posted: Tue Sep 06, 2011 4:48 am
by sickbxy
Thank you!!! I didn't think I would find a fix and was even nervous about trying this but it worked!

Re: Solution for error: JTableMenu: :_getNode

Posted: Wed Oct 05, 2011 2:34 pm
by Nickev
Hi all!
Thanks for solution! However, I have problem at step 2. After I rebuild the menus. I've seen this:

Fatal error: Call to undefined method MenusModelItem::getMessage() in X:\home\ge\www\administrator\components\com_menus\controllers\menus.php on line 95

Help please)

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 06, 2011 5:24 pm
by Taz_1999
Thank you Lieven Borms!

I followed your instructions and it worked perfectly. Somehow the first record in menus (with id=1) had gone away to the great digital farm in the sky.

In my case I had upgraded like this: From J1.0 --> J1.5 --> J1.7, and your fix worked.

Re: Solution for error: JTableMenu: :_getNode

Posted: Sat Oct 08, 2011 5:24 pm
by Lieven Borms
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: Sun Oct 09, 2011 9:08 am
by Nickev
Lieven Borms,
It works!! Thank you!!

Re: Solution for error: JTableMenu: :_getNode

Posted: Sat Oct 15, 2011 10:12 pm
by kickdrummer
Works like a charm. New installation of joomlart T3 framework 1.7. Thanks alot.

Re: Solution for error: JTableMenu: :_getNode

Posted: Wed Oct 19, 2011 12:46 pm
by belex23
Thank you so much! It works perfectly!!

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 20, 2011 6:00 pm
by lgriffith71
I'm having the same error and I'm trying to follow the directions. I get to my PHPmyadmin and get to the correct database... I see 3 types of menus: Menu, menu_types and module_menu. If I chose menu and then click SQL, I have more than 20 columns and the text box available already has something in it:

SELECT*FROM 'a8z7y_menu' WHERE 1

Do I delete that and paste the other text in there and then what?

I'm the most green ??? beginner in the room, so for my ignorance, but I'm learning as I go.

Laurie

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 20, 2011 6:31 pm
by Lieven Borms
It’s seems that there’s a small mistake in the query.
In your case you should execute the following query: SELECT*FROM 'a8z7y_menu' WHERE ‘id’=1
If you execute these one you shouldn’t get any results.
The “JTableMenu: :_getNode” error appears when the record with ‘id’=1 in the “prefix_menu” table is missing. So you must add this record to solve the problem, See step 1. The easiest way is to use the slbs.php file or you can execute the insert-query.
After adding these record you must rebuild the menu’s and these happens in step 2.

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 20, 2011 6:39 pm
by lgriffith71
:( I think I'm just in over my head. I don't understand what you're saying at all. I don't know WHERE to add a record. Thanks anyhow

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 20, 2011 6:55 pm
by Lieven Borms
In your phpMyAdmin go to the ‘SQL’ tab and execut the query below.
I assume that the prefix of your database is “a8z7y_”
I don’t know the name of your database, so you need to replace “DATABASE_NAME” with the real database name in the query

INSERT INTO `DATABASE_NAME`.`a8z7y_menu` (`id` ,`menutype` ,`title` ,`alias` ,`note` ,`path` ,`link` ,`type` ,`published` ,`parent_id` ,`level` ,`component_id` ,`ordering` ,`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', '0', '0000-00-00 00:00:00', '0', '0', '', '0', '', '0', '0', '0', '*', '0')

After executing these query you need to do step 2. Rebuilding menus like described on top of these topic.

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 20, 2011 7:02 pm
by lgriffith71
OMG!!!!!!!!!!!
You're my hero!!:)

I can't thank you enough. I SO appreciate your instruction. I know it's frustrating dealing with newbies, but I'm so thankful you did.

THANK YOU THANK YOU THANK YOU

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 20, 2011 7:17 pm
by Lieven Borms
No thanks. I’m happy that i could help to solve your problem.
Believe it or not but 2 years ago I didn’t know the existence of Joomla or even CMS.
So I know how hard it can be and especially with an error like these. But with good support you can learn very fast.
These solution worked for everybody and it’s much better than recreate your whole website back from zero :laugh:

Re: Solution for error: JTableMenu: :_getNode

Posted: Mon Oct 24, 2011 12:22 am
by timtecsa
I just had this same problem on a fresh install (on MAMP Pro) of Joomlart's T3 Framework V2 for J1.7 without sample data from Quickstart. The db table fix worked fine.

Re: Solution for error: JTableMenu: :_getNode

Posted: Thu Oct 27, 2011 2:22 pm
by insprymedia
Thanks so much! Worked perfectly! :)