Try and move sub menu item to another parent.
Also tried recreating a new parent in case the old one was bugged.
menu item to move and stay published
it unpublishes, even if you move it back it will not republish
PHP Built On | Linux vps.cinric.com 2.6.32-042stab116.2 #1 SMP Fri Jun 24 15:33:57 MSK 2016 x86_64 |
---|---|
Database Version | 5.6.37-log |
Database Collation | latin1_swedish_ci |
Database Connection Collation | utf8mb4_general_ci |
PHP Version | 7.0.22 |
Web Server | Apache |
WebServer to PHP Interface | cgi-fcgi |
Joomla! Version | Joomla! 3.7.4 Stable [ Amani ] 25-July-2017 11:11 GMT |
Joomla! Platform Version | Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT |
User Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0 |
We can see things are wrong in the database and read reports it involved updating to 3.7 but had not experienced issues with major items until now. We had successfully recreated one or two before but now when we create a new one it seems its giving it a type 'component'. instead of url, params seems wrong among other things.
We tried running this https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/mysql/3.7.0-2017-01-17.sql since a search on github revealed someone else with similar problems. But we don't know how to adapt it for OUR database and our attempts resulted the menu vanishing completely. We also can't be sure its the same issue.
We need expert help but don't know where else to look. The forums gave us no assistance.
Labels |
Added:
?
|
Yes. The new parent menu item is published. But I can't put anything under it. I think something is wrong in the database.
Run this query in phpmyadmin
SELECT `published` FROM `#__menu` WHERE `alias` = 'root';
replace #__
with table prefix and show result.
it gives this:
Showing rows 0 - 0 (1 total, Query took 0.0006 seconds.)
SELECT published
FROM wchs_menu
WHERE alias
= 'root'
The #__menu table does not have a very important record. Make a copy of the #__menu table and then do the following query
INSERT INTO `#__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, 43, 0, '*', 0);
I don't think I understand. Do you mean export a copy? It seems to have a lot in the wchs_menu.
Category | ⇒ | com_menus |
Status | New | ⇒ | Discussion |
Do not do the above.
Be careful, create a database back up.
I suggest you rebuild the menu by clicking the "Rebuild" button on the menu page. Then try to move menu item again.
You can also unpublish your parent menu and republish again and check if does it work.
Ok new information.
Rebuilding alone doesn't work, nothing would publish. So I looked at the database again. Even though it shows in the backend as parent of 'students' the database is aiming at a non existent parent id. I moved my replacement parent item to that ID number and that fixed much.
However now I have the odd problem of the path going blooey. For instance, I move an item under a parent item called 'students'. In the backend it shows correct, but in the front it shows in the sub menu under 'home'. A look in the database shows the path has altered to home/whatever even though parent id is now correct.
At times I think I've got it, it looks fine and then I refresh the page and it reverts. I tried running rebuild menu and that works for awhile but it doesn't last.
Also getting this really odd message: Error
Save failed with the following error: MenusTableMenu::moveByReference() is trying to make record ID 105 a child of itself.
IMO this is not a Joomla issue.
Rebuilding alone doesn't work, nothing would publish.
That mean you probably have not run every sql queries on update.
You have a little mess in #__menu
table.
Record (row) with alias = 'root' should have column published = 1, check this in your phpmyadmin.
Next go to admin menu list and click on search tools
and change select status
to all
.
You may see menu items which are trashed. Publish them.
:( I have asked joomla forums for the original issue but didn't get a response. and menu item root is there and published. We already have deleted all trashed items.
At times I think I've got it, it looks fine and then I refresh the page and it reverts. I tried running rebuild menu and that works for awhile but it doesn't last.
Can you make a website copy, and unpublish all 3rd party system plugins ?
I am closing this as it is not a core code issue but is specific to your site
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-09 06:42:03 |
Closed_By | ⇒ | brianteeman |
Whether new parent menu was published?