Support

Admin Tools

#22328 Admin Tools Joomla! Update Email

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
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Wednesday, 25 March 2015 02:24 CDT

n3t.cz
 Hi,

recently, there is new Joomla! update to version 3.4.1. I noticed this and was waiting for email from my sites. But no comes. I checked the settings and everything seems Ok. If I manually change the 'atoolsjupdatecheck_lastrun' value to be far in past, email is send immidiatelly. If I enable 'ATJUPDATEDEBUG' in plugin itself, email is also sent, so I do not think, that there is some misconfiguration, or emailing (spam) problem.

I have aprox. 10 websites with this functionality enabled, but no email received. It has various PHP versions, various MySQL versions, various hosts, various hostings. Cache time in com_installer is everywhere left to default 6 hours.

Also I noticed that language selection functionality is not functional in the plugin, but remains in its configuration.

In current version there is typo in the email text: 'nJoomla! version currently installed' - additional leading n.

Finally, I noticed that Super Administrators are checked by checking hard coded Group Id 8, which is Joomla initial Super administrators group, but could changed (it was issue on one of my sites). Would be great to have this optional, or at least documented, as it influeance the functionality a lot.

best regards

Pavel

nicholas
Akeeba Staff
Manager
It sounds like the atoolsjupdatecheck_lastrun key in the #__admintools_storage table has a timestamp in the future. Try removing it and see if the email is sent.

Regarding the language selection, correct, we removed that feature. I will remove the option. The reason was that the translators didn't consistently update the string when we changed the text. This resulted in some languages having very inconsistent and misleading language strings.

Regarding the hardcoded group ID this is something I'd like to get rid of. Sure enough, I can go through each user group and check if it has the super user privilege. The only problem is that I've seen sites with hundreds of groups. This makes the plugin prone to timeout. I don't know, maybe I should stop caring about these badly configured sites after all...

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!

n3t.cz
Hello Nicholas,

I checked that value, and no, it is not in the future. If I add some echoes directly in the plugin it shows me this:

$now: 1427214406 - 2015-03-24T17:26:46+01:00
$last: 1427196231 - 2015-03-24T12:23:51+01:00
$now-$last: 18175
$cache_timeout: 21600

So at this moment no update email should be send, that is correct, however it wasn't send even in past 6 hours, according to $last it should be checked (and sent) at 12:23, which is strange.

And yes, if I delete the value in database (or lower it manually), email is correctly sent. Seems to me, like if the value is updated in database correctly, but email is not sent at that time for some reason. I will try to add some logs to get more overview what is going on.

Regarding language selection: I understand that, removing the option would be great, not to confuse administrators.

Regarding group id: maybe simplest solution would be to have option in plugins configuration to select group id of Super Administrators, which would default to 8.

Pavel

nicholas
Akeeba Staff
Manager
Regarding the timestamp: I cannot reproduce this issue. On my dev site (Joomla! 3.4.0) the timestamp was in the past. The email was sent correctly. Please note that you need several requests to your site before the plugin is triggered. The plugin will be triggered only one in five times there is a request to the site made after the cache has expired.

Moreover, please note that Joomla! itself must report an updated version at the time the plugin gets triggered. On some sites the Joomla! update cache itself gets stuck. Sorry, we can't fix that. The only thing we can do is ask you to use Akeeba CMS Update which does NOT go through the Joomla! update cache, implementing its own much more reliable system.

Regarding the group ID we already determine the correct user group in the code we have in Akeeba CMS Update. It's as simple as copying that code back to Admin Tools' plugin. No need to reinvent the wheel :)

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!

n3t.cz
To be honest it is confusing. Seems like, when the plugin is triggered by opening site from my computer, everything works well. However if I leave the site running, I do not receive any update email (from any of my sites).

It does not look like, there is an update cache issue, as changing the timestamp in database, removing it, enabling debug and after invoking plugin from my computer works well. Maybe there could be some conflict with web firewall, as I use GeoIP blocking?

I add detailed logging in plugin itself and will leeve it to its own life. If I will discover something, I will let you know.

Good news about group id :)

nicholas
Akeeba Staff
Manager
The "one in five times" activation rule is necessary to prevent race conditions on high traffic site. Think about a site which gets about 3 page views per second. The code between reading the last check timestamp and the code which writes it back to the database before preparing to send emails takes about 50 msec. If two different page views reached that code block less than 50 msec apart we'd end up sending two emails and not write the last timestamp correctly. Why? Because MySQL would be in a row lock when we'd try to write it. So a third email would be sent and possibly a fourth, fifth, hundredth, thousandth email would also be sent. It did happen.

Please use Akeeba CMS Update and its plugins instead. It's much more reliable for reasons which have to do with Joomla!'s API, not our code.

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!