If after updating to Joomla 3.7.x you have started glitching menu when trying to add a new item and gives an error:
Failed publishing 1 menu item as at least one of its parents is unpublished or one of its children is checked out.”
Or in the Russian localization:
Category 1 publication error because at least one of her parents is not published or one of her descendants is extracted.
…It means that during the upgrade the old menu items referring to components (like banners, contacts, etc.) that have been unsupported for a long time were removed.
The first way is to use SQL-queries to clean up the old menu items from the database. You can make them yourself, something like
UPDATE `#_menu` SET `menutype` = 'main' WHERE `id` = ***;
but it’s easier to use this guide. Many of this solution has helped, but to me – no, because my site on Joomla exist from 2004 and the database is especially a hard mess… So here is the second, my author’s way, which solved the problem:
- Be sure to make a backup! We will have to edit the database, and we can’t joke about it
- Log in to phpMyAdmin
- choose table **_menu on the left (it will be named, for example, j25_menu)
- press the “overview” button (at the top left)
- sort the table by ‘menytype’ first and delete the ‘menu’ values
- now sort the table by ‘title’ and clean up old components like com_banners , com_contact and other stuff you don’t have installed and use. Do not delete what you do not know; google components that you do not know about.
- If it’s still glitchy, sort by ‘path’ and take another look around for obsolete menu items.