Can't add menu's

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
in2tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Jan 22, 2009 7:39 am

Can't add menu's

Post by in2tech » Wed Jun 04, 2014 2:15 am

For some strange reason I can no longer add menu items to my site of any kind.

Here is the start of the error:
Warning
Save failed with the following error: exception 'UnexpectedValueException' with message 'MenusTableMenu::_getNode(1, ) failed.'....etc......

I am on Joomla 3.2.3, and also when I tried to update my Akeeba Backup it removed it from the admin menu....Now I can no longer access it either, as it no longer shows up in the admin menu.

Any help appreciated!

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Can't add menu's

Post by sovainfo » Wed Jun 04, 2014 8:49 am

Have you tried the rebuild in the menu manager?
Verify with phpMyAdmin that row 1 exists in #__menu.
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

in2tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Jan 22, 2009 7:39 am

Re: Can't add menu's

Post by in2tech » Wed Jun 04, 2014 10:28 am

sovainfo wrote:Have you tried the rebuild in the menu manager?
Verify with phpMyAdmin that row 1 exists in #__menu.
Rebuild Menu's gave me another error:
Fatal error: Call to undefined method MenusModelItem::getMessage() in...(mysitepath)..administrator/components/com_menus/controllers/menus.php on line 111

Don't see a #_menu in phpAdmin just sgii_menu, know just enough about phpMyAdmin to look at thing's.

Weird thing is I am wanting this fixed for my one main component I use (jReview) and can restore from an Akeeba backup but when I do I can add menu's and so forth but the component jReview mostly works but hang's up with processing intermittently and I can't get past it once it hangs up.

If I could get the...processing when adding fields in the Field Manager part of jReview ....fixed when I restore an Akeeba backup than everything would work!

Did that make sense?

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Can't add menu's

Post by sovainfo » Wed Jun 04, 2014 12:32 pm

The #__menu is referring to sgii_menu. When you look in sql files delivered with Joomla you'll see #__tablename which will be translated to using the prefix in the current environment. See your Global configuration Database section.

So, is there a row 1 with title "Menu_Item_Root" ?
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

in2tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Jan 22, 2009 7:39 am

Re: Can't add menu's

Post by in2tech » Thu Jun 05, 2014 9:05 pm

sovainfo wrote:The #__menu is referring to sgii_menu. When you look in sql files delivered with Joomla you'll see #__tablename which will be translated to using the prefix in the current environment. See your Global configuration Database section.

So, is there a row 1 with title "Menu_Item_Root" ?
I don't see a row 1 with "Menu_Item_Root" when I click on sgi_menu.

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Can't add menu's

Post by sovainfo » Thu Jun 05, 2014 9:24 pm

Run in phpMyAdmin :

Code: Select all

INSERT INTO `sgi_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);
After that rebuild in the menu manager again.
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

vtwebdesign
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Aug 18, 2010 1:47 pm

Re: Can't add menu's

Post by vtwebdesign » Wed Jun 18, 2014 6:42 pm

thx. this also worked when i saw menu_item_root when assigning modules. and i couldn't order menus, everything was all messed up. thx a lot, you saved my site.

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

Re: Can't add menu's

Post by rowbygoren » Wed Aug 27, 2014 9:59 pm

FYI this specific command phpmyadmin apparently doesn't appear to work with Joomla 3.3.3.

For example, it returns an error: '#1054 - Unknown column 'ordering' in 'field list'"
I am looking for a similar command will post it here -- if I find it.

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

Re: Can't add menu's

Post by rowbygoren » Thu Aug 28, 2014 12:38 am

Hi
For anyone who runs into this problem, if your situation is like mine, then the fix is available. All is not lost :)

You will need to be comfortable using phpmyadmin --- which should be found in your hosting control panel. To a new phpmyadmin user it might look intimidating, but using it for this fix is easy. But if you know someone who is experienced with phpmyadmin then have them do it. And / or check out the many phpmyadmin tutorials on [youtube].

As was mentioned earlier in this thread you need to determine if there is a "row 1 with title "Menu_Item_Root"...

I went into phpmyadmin and clicked on the menu table. In my case I could see that the tables started with ID#2. ID 1 (also known as ROW 1) was indeed missing.

I tried running the mysql command in this thread but joomla 3.3.3 has apparently changed a bit and that command resulted in an error.

So here's what I did -- without using a mysql command.

I have a good backup of the site (which I created a few days ago using Akeeba backup). I restored the good backup to another unused domain I have laying around. I went into that other domain's phpmyadmin panel and looked at that menu table. I clicked on ID#1's edit icon and saw all of Row #1's settings. There are hardly any settings, but apparently they are all needed.

Then I went into my live site (after doing a backup of the site and database) and in the live site's cpanel I went to phpmyadimin and clicked on the menu table and then clicked on the INSERT button and copied and pasted the info the few fields from the "good" site to the problem site. We're talking about just a few fields. Not much at all.

I saved the changes in phpmyadmin and went back to my site. I cleaned the cache etc, and then tried adding a menu item. And it was fixed.

If you don't have a good backup it is possible you could go to a good copy of joomla (that uses the same version of Joomla.) I think it might not even have to be the same site and copy that ROW / ID #1 settings to your defective site. Not sure if that would work. But if that works for anyone please post that solution here.

Of course if anyone has a mysql command that would work with Joomla 3.3.3. then please post it here.

Regards
Rowby
http://www.rowby.com
fixing-menu-problems8.jpg
You do not have the required permissions to view the files attached to this post.

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

Re: Can't add menu's

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

The below might be a better solution than my solution.

http://forum.joomla.org/viewtopic.php?f ... 1#p3180878

sovainfo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8808
Joined: Sat Oct 01, 2011 7:06 pm

Re: Can't add menu's

Post by sovainfo » Thu Aug 28, 2014 7:40 am

As you can see for yourself the statement doesn't contain 'ordering' in the field list. As of J3.0.0 the column 'ordering' is droppd from #__menu.
Issue with migrating? Include logs/joomla_update.php in your report!
Blank screen? Verify pagesource for HTML code (javascript error)
Installation failing on populating database? Install with set_time_limit(0)
Document your customizations!

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

Re: Can't add menu's

Post by rowbygoren » Thu Aug 28, 2014 2:40 pm

Hi sovainfo,
I happily stand corrected.

So, just to confirm for other joomla 3.x users then your mysql command should do the trick. Via the phpmyadmin panel... following the instructions in your post.
..Rowby

User avatar
cybersalt
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 118
Joined: Thu Aug 25, 2005 10:36 pm
Location: Victoria, Canada
Contact:

Re: Can't add menu's

Post by cybersalt » Thu Jun 18, 2015 11:11 pm

Just had this problem on a 3.4.1 site I was using SPtransfer to bring things over from a 2.8 site.

Here is the mysql command that fixed it for me (remember to replace "jos_" with whatever is the table prefix for your database.)

Code: Select all

INSERT INTO `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, 197, 0, '*', 0);
Tim Davis
Cybersalt | Basic Joomla Tutorials
https://www.cybersalt.com | https://www.basicjoomla.com

cjamesrun
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jul 14, 2006 5:13 pm

Re: Can't add menu's

Post by cjamesrun » Sun Oct 25, 2015 3:54 am

This last item worked for me Joomla 3.4.5. Thank you!

ncwebdude2
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Sat Mar 21, 2015 5:24 pm

Re: Can't add menu's

Post by ncwebdude2 » Sat Dec 12, 2015 7:48 pm

I have found the Insert tab but got an error message " MySQL said: Documentation
#1062 - Duplicate entry '1' for key 'PRIMARY'
I entered "1" in the id Value field
Is this the primary reason for the menu item failure to add/show?
You do not have the required permissions to view the files attached to this post.


Locked

Return to “Administration Joomla! 3.x”