Update Admin Tools Core and Pro to v7.4.5 and later on Joomla 5.0.1
Extension updates as normal with database tables/structure updated.
Database problem reported in System > Maintenance > Database
Joomla 5.0.1
MariaDB 10.6.15
PHP 8.2.9
Admin Tools Core v 7.4.5 and 7.4.6
Issue reported by many on Akeeba Forums. Problem first occurred on update to v7.4.5. v7.4.6 was released to try to solve what Akeeba say is a cosmetic issue and the DB tables/structure is as it should be. They are advising that Joomla is reporting an issue where one doesn't exist because Joomla is comparing the DB tables/structure with Admin Tools v7.1.1
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
Information Required
|
@richard67
It says:
Table "xxx_admintools_log" has the wrong type or attributes for column "reason" with type enum (then a whole load of columns) (from file 7.4.5-20231214.sql)
11 Database changes were checked
19 database changes did not alter table structure and were skipped
This is after updating to v7.4.6 and updating the structure to try to fix.
Hope this helps.
@JohnVesey It helps a bit. What would help more would be to have a package of admin tools here so I could check all update SQL scripts provided with that package. But I don't have Akeeba Admin Toools here. Is there some download publicly available? I don't want to install it, I only want to unpack and check for the update SQL scripts.
I think the problem comes from how the database checker works, and at least the head of Akeeba should know that.
The checker goes through all update SQL scripts of that extension and check for DDL (data definition language) statements, e.g. "CREATE TABLE", "ALTER TABLE table MODIFY column" and so on and checks if the database structure fits for that statement. So if have an update SQL which creates a table or modifies a table column, and then for a later version you have another update SQL creating the same table again or modifying the same table again, the update to that later version either has to replace the first update SQL script from the older version by one where the DDL statement is commented out, or the installer script of that extension update has to remove the old update SQL script,. like the CMS core does when you update to a new major version, it deletes the old update SQL scripts. E.g. when updating from J3 to J4, all 2.5.0-* and 3.x.y-* update SQL scripts are deleted because otherwise exactly that would happen, the database checker would complain about the structure not mathing either the older or the newer DDL statement.
But to be really sure that this is the problem I would need to check the scripts. Then I would advise what Akeeba should do to fix it. Unfortunately I don't have a direct communication channel with them.
@richard67
Thanks Richard. Package attached.
The release notes for v7.4.6 say:
"Workaround for the Joomla! bug making it erroneously claim in the Maintenance: Database page that Admin Tools' database tables are not up-to-date when they actually are. The Database page in Joomla incorrectly claimed that Admin Tools' database tables where out of date, even though they were not. This is a bug in Joomla! itself.
The “problem” – if it can even be called that with a straight face – was that we changed the same column on the same table, column reason in table #__admintools_log, twice since releasing version 7.0 two and a half years ago. Once in version 7.1.1 back in early 2022, and once in version 7.4.5 in 2023.
We had the reasonable expectation that Joomla would very easily handle this common, simple, and straightforward use case by doing what is common sense: only check against the latest version, ignoring the older version. Unfortunately, Joomla does not follow common sense. It saw that the database table structure conforms to the latest version (7.4.5) but not the old version (7.1.1), therefore erroneously displayed a warning, telling you that the table is not up-to-date with the old version 7.1.1. This is a bug in Joomla!.
Our solution is to release this here version 7.4.6 which… wait for it… deletes the older version's update file so that Joomla! no longer trips over itself."
Hope this helps a little more. :-)
Sorry. Package is a.zip file so can't attach.
Download is here:
https://www.akeeba.com/download/admintools/7-4-6.html
I should, for completeness, say that v7.4.6 doesn't fix the problem. One user in Joomla's Forums reports that problem can be solved by uninstalling Admin Tools and then reinstalling.
@JohnVesey Their release not is wrong. It is not a Joomla bug, it is how the database checker works and it was always like that.
When the core had e.g. modified a column or added a new index with an update SQL and there was already another update from an older version which modified the same column or added the same index, the update to the new version always has also modified the old update SQL script by removing or commenting out the older statement for that column or index. It was always like that and should be well know at Akeeba. I agree with them that it could be done more clever. But a bug is when a software doesn't work as intended by the developer.
I've just checked their packages for versions 7.4.6, 7.4.5 and 7.1.1.
As I can see, in 7.4.6 they have removed the update SQL script "7.1.1-20220209.sql" which was introduced with 7.1.1 and still present in 7.4.5. So that problem is fixed on a new installation of 7.4.6.
But it seems they don't delete that file when updating from 7.1.1 or later to 7.4.6. They could fix that by adding some code to their installer script "script.admintools.php" to do that, or they could add the file back but remove or comment out its content, so the file will be removed or replaced when updating to the next version. That would be the right fix.
Maybe you can forward them this information? You can tell them it comes from me or refer to my comment here.
As a workaround (besides uninstalling and installing again), you can do the following:
Update to their version 7.4.6 if not done yet and then delete the file "7.1.1-20220209.sql" in the "sql" folder for the Akeeba core.
After that, if the database checker still shows an issue, it should be from the "7.4.5-20231214.sql" file. Select the check box for that extension in the database checker and then use the "fix" button, then all is ok.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-12-22 10:47:52 |
Closed_By | ⇒ | richard67 |
Closing as expected behaviour.
Thank you @richard67 - the workaround works just fine. I've deleted all the .sql files except the one for v7.4.5 and updated the db table structure. All now good.
Workaround shared in Joomla Forums.
Thank you @richard67 and @JohnVesey ?????
Happy New Year ???
@JohnVesey When that database problem is reported and you hover with the mouse over the red badge showing that there is a problem, a popup will show the details of that problem. What does it show?