Support

Akeeba Backup for Joomla!

#40854 [PROFILENAME] is empty is completion emails

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
5.1.0
PHP version
8.2.20
Akeeba Backup version
9.9.4

Latest post by nicholas on Monday, 24 June 2024 01:01 CDT

davidascher

the value of [PROFILENAME] is coming up empty in the post processing emails. I took the liberty of looking at the code and I found:

 

/**
* Returns the selected profile's name. If no ID is specified, the current
* profile's name is returned.
*
* @return string
*/
public function get_profile_name($id = null)
{
if (empty($id))
{
$id = $this->get_active_profile();
}
$id = (int) $id;

$db = Factory::getDatabase($this->get_platform_database_options());
$sql = $db->getQuery(true)
->select($db->qn('description'))
->from($db->qn('#__akeebabackup_backups'))
->where($db->qn('id') . ' = ' . $db->q($id));
$db->setQuery($sql);

return $db->loadResult();
}

;

which seems wrong to me. The descriptions in the #__akeebabackup_backups table look like this one:

Backup taken on Saturday, 08 June 2024 08:03 EDT

which is not the "profile name".  The profile name is in the "description" field of the #__akeebabackup_profiles table.  

I think simply changing the table reference from #__akeebabackup_backups to #__akeebabackup_profiles ought to fix this issue.

I have attached screenshots of completion emails for my profiles #2 and #3. It happens that there is an entry in the backups table with id=2 but not for id=3, therefor there isn't any 'description' field available for id=3 and so nothing is returned by the get_profile_name function. However, for id=2 the 'description' field in the backups table is found and inserted in the body of the message in place of the [PROFILENAME] placeholder - "Backup taken on Saturday, 08 June 2024 08:03 EDT Total Size 855.51 MiB". Of course, that is not at all what should have replaced that placeholder.

It would be nice if the PROFILE NAME was also available in the email subject. Apparently, there is no processing of '[PROFILENAME]' as a placeholder in the subject line so we just get to see the placeholder there.

nicholas
Akeeba Staff
Manager

That should indeed be #__akeebabackup_profiles instead of #__akeebabackup_backups. 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!