Support

Akeeba Backup for Joomla!

#12575 Notification icon deactivated

Posted in ‘Akeeba Backup 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
Akeeba Backup version
n/a

Latest post by nicholas on Monday, 11 June 2012 02:07 CDT

JUG-Heerenveen
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: (2.5.4)
PHP version: (5.3.3)
MySQL version: (5.1.41-community )
Host: (optional, but it helps us help you)
Akeeba Backup version: (Akeeba Backup Professional 3.5.1)

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:

Hi Nicholas,

I think I found small issue with Akeeba Backup Pro with the Akeeba Backup Notification Module (Quick Icon).

In our administrators control panel we have always the Quick Icon enabled. As long as we log in as a Super User everything stays normal. But after I've logged in and out with a different (test)account (Super User logged out first) which has only few author-rights for com_content, the Quick Icon has been deactivated. When I log in as Super User again, there is no Quick Icon anymore in control panel. I must visit the module-manager to enable the Quick Icon every time again.

It's not a major problem, but just a bit annoying. Would be nice if you could fix it.

Best regards,
Benno Stulemeijer


nicholas
Akeeba Staff
Manager
Hello Benno,

The icon is supposed to be self-deactivated only if it detects that it caused the administrator page to throw an error. Maybe it threw an error, that's why it deactivated itself?

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!

JUG-Heerenveen
Hi Nicholas!

I investigated a bit the code in mod_akadmin.php for this issue.

You wrote:
The icon is supposed to be self-deactivated only if it detects that it caused the administrator page to throw an error. Maybe it threw an error, that's why it deactivated itself?


It looks like the 'error throwing code' here is the code which checks for people authorized to take backups. I think this is reason for this issue (line 92):
$user = JFactory::getUser();
if (!$user->authorise('akeeba.backup', 'com_akeeba')) {
	return;
}

Because normally only Super users are allowed to take backups, the iconmodule gets deactivated for users of the backend with lesser rights. But alas because of this code the module never get activated anymore(line 94: 'return' statement and line 228: // Reenable ourselves = not executed anymore).

Unfortunately only reactivating by hand in modulemanager stays possible. Everytime again :-( When a Super User logs in after a user with no Akeeba Backup rights have been logged in, the iconmodule will always stay deactivated, because of the sql query code at line 38:
	->where($db->qn('published').' = '.$db->q('1'))
. The value will not be true here (when the Super User logs in) because 'published' is still '0' here.

When I hack the code by setting published to '1' at line 47 (disabling deactivating of the module) the issue has been solved, but I think this is not what you wanted this 'deactivating' code for at line 50.

Maybe a fix?

Best regards,
Benno Stulemeijer

nicholas
Akeeba Staff
Manager
Nice catch! Indeed, that return will deactivate the plugin. I applied a workaround in the latest dev release. Can you please install it and report back your results?

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!

JUG-Heerenveen
Hi Nicholas,

I tested your updated version of mod_akadmin.php from SVN.
Our notification icon shows up again as I log in as Super User after a login with lesser accessrights! :-)
So, it looks like you have solved this bug. Great!

Thanks for fast fix!

Best regards,
Benno Stulemeijer (alias Klipper or BommesX)

nicholas
Akeeba Staff
Manager
Thanks to your feedback and your debugging :) Thank you!

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!