Support

Admin Tools

#41613 BIGINT UNSIGNED value is out of range

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.2.4
PHP version
2.2.27
Admin Tools version
n/a

Latest post by nicholas on Thursday, 20 February 2025 01:58 CST

incolor

When I try to upgrade to: pkg_admintools-7.7.0-pro.zip

I get this error:

  BIGINT UNSIGNED value is out of range in '(`gwsd4`.`ivegk_menu`.`level` - 1)' Package Update: There was an error installing an extension: com_admintools-pro.zip Before updating ensure that the update is compatible with your Joomla! installation. 
You are strongly advised to make a backup of your site's files and database before you start updating.

×

danger Error updating package.   I've successfully updated other Joomla websites on the same server without error.    I also noticed that AdminTools disappeared from the Components menu since the update error. I tried to update both with the Joomla extension updater and separately by uploading the complete file with the Joomla extension installer. Both give the same error.

 

I checked and there are no Joomla system warnings

nicholas
Akeeba Staff
Manager

This error is thrown either by Joomla itself or a third party extension. We do not have any code that directly tries to modify the #__menu table on your site.

In fact, the problem comes from Joomla's code. When you upgrade a component Joomla will try to delete the administrator menu items it had created under the backend Components menu. These are records in the #__menu database table. This happens in \Joomla\CMS\Installer\Adapter\ComponentAdapter::_buildAdminMenus() which calls \Joomla\CMS\Installer\Adapter\ComponentAdapter::_removeAdminMenus().

In its turn, \Joomla\CMS\Installer\Adapter\ComponentAdapter::_removeAdminMenus() will create an instance of the \Joomla\Component\Menus\Administrator\Table\MenuTable class and call its delete() method.

The \Joomla\Component\Menus\Administrator\Table\MenuTable::delete() calls the parent method, i.e. \Joomla\CMS\Table\Nested::delete(). This is where the daft code that blindly does level = level - 1 is.

The problem is that the level field of the #__menu table is an unsigned big integer (BIGINT UNSIGNED) i.e. it can only have values equal to or higher than 0 (zero). When Joomla installed or last updated the component a bug in Joomla made one of the admin Component menu items created for Admin Tools to have a level of 0 which is, of course, wrong. Adding insult to injury, Joomla's daft code now causes a database error when it tries to delete these invalid items, preventing you from upgrading the component.

You can resolve this issue, but it requires some manual intervention in the database. You have to edit the #__menu table. Find the items with menutype = main and a title starting with COM_ADMINTOOLS. Set the level of the one items whose title is exactly COM_ADMINTOOLS to 1. Set the level of the other items whose title starts with COM_ADMINTOOLS_TITLE_ to 2.

Having restored the correct levels of the menu items, you can now perform the upgrade correctly.

This is a bug that should be reported to and fixed by the Joomla project. The Joomla project made it clear that it does not want me to submit bug reports or bug fixes anymore, therefore I cannot do that. I can only point out the Joomla bugs I know to my clients, explain why they happen, and provide workarounds.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!