?
avatar Arydiel
Arydiel
5 Sep 2017

Steps to reproduce the issue

Try and move sub menu item to another parent.
Also tried recreating a new parent in case the old one was bugged.

Expected result

menu item to move and stay published

Actual result

it unpublishes, even if you move it back it will not republish

System information (as much as possible)

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

Additional comments

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.

avatar Arydiel Arydiel - open - 5 Sep 2017
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Sep 2017
avatar wojsmol
wojsmol - comment - 5 Sep 2017

Whether new parent menu was published?

avatar Arydiel
Arydiel - comment - 5 Sep 2017

Yes. The new parent menu item is published. But I can't put anything under it. I think something is wrong in the database.

avatar wojsmol
wojsmol - comment - 5 Sep 2017

Run this query in phpmyadmin

SELECT  `published` FROM  `#__menu` WHERE `alias` = 'root';

replace #__ with table prefix and show result.

avatar Arydiel
Arydiel - comment - 5 Sep 2017

it gives this:
Showing rows 0 - 0 (1 total, Query took 0.0006 seconds.)
SELECT published FROM wchs_menu WHERE alias = 'root'

avatar wojsmol
wojsmol - comment - 5 Sep 2017

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);
avatar Arydiel
Arydiel - comment - 5 Sep 2017

I don't think I understand. Do you mean export a copy? It seems to have a lot in the wchs_menu.

avatar Arydiel
Arydiel - comment - 5 Sep 2017

I tried running anyway and got error

#1062 - Duplicate entry '1' for key 'PRIMARY'

avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Sep 2017
Category com_menus
avatar franz-wohlkoenig franz-wohlkoenig - change - 6 Sep 2017
Status New Discussion
avatar csthomas
csthomas - comment - 7 Sep 2017

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.

avatar Arydiel
Arydiel - comment - 7 Sep 2017

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.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Sep 2017

@Arydiel have you asked help on the forums as this repository concerns Joomla coding.

avatar csthomas
csthomas - comment - 7 Sep 2017

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.

avatar Arydiel
Arydiel - comment - 7 Sep 2017

:( 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.

avatar ggppdk
ggppdk - comment - 7 Sep 2017

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 ?

avatar brianteeman
brianteeman - comment - 9 Sep 2017

I am closing this as it is not a core code issue but is specific to your site

avatar brianteeman brianteeman - change - 9 Sep 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-09-09 06:42:03
Closed_By brianteeman
avatar brianteeman brianteeman - close - 9 Sep 2017

Add a Comment

Login with GitHub to post a comment