Adding an item to the components menu in the Joomla! admin
After a failed update of a plugin, or any other Joomla! component, an unpleasant situation happens - the icon disappears from the menu. You can easily bring it back or add it again.
For that we will need the following information:
- the database name
- the database prefix (mine is jml, yours can be different)
- the user name and the password
All this information can be taken from the configuration.php file.
Then go to the admin panel and check if the admin component is available at the following link:
http:///www.<strong>your_site.com</strong>/administrator/index.php?option=com_<strong>component_name</strong>
Then connect to the database. Find the last id in the menu table:
select id from <strong>jml</strong>_menu order by id desc limit 1;
This is needed so that you do not overwrite an element that already exists. When you add the record you have to increase that value by 1. In my case the last one was 323, so my component goes to the database with id 324.
Then insert the information you need into the table:
INSERT INTO `<strong>jml</strong>_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 (<strong>324</strong>, 'main', 'COM_<strong>COMPONENT_NAME</strong>', 'com-<strong>component_name</strong>', '', 'com-<strong>component_name</strong>', 'index.php?option=com_<strong>component_name</strong>', 'component', 0, 1, 1, 10034, 0, 0, '0000-00-00 00:00:00', 0, 1, '../media/com_<strong>component_name</strong>/icons/<strong>component_name</strong>.png', 0, '', 425, 426, 0, '', 1);
Make sure the icon of the component exists in the media folder. Fix the path if needed:
media/com_<strong>component_name</strong>/icons/<strong>component_name</strong>.png
Go to the admin panel and look at the components menu.