Support

Akeeba Backup for Joomla!

#37798 Update gave error message

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
4.2.2
PHP version
8.1.10
Akeeba Backup version
9.3.1

Latest post by nicholas on Sunday, 06 November 2022 08:04 CST

prh47bridge

I have just run the update from Akeeba 9.3.0 to 9.3.1. Joomla gave the error message:

Pkg_AkeebabackupInstallerScript::postflight(): Argument #2 ($parent) must be of type Joomla\CMS\Installer\Adapter\PackageAdapter, Joomla\CMS\Installer\Adapter\LibraryAdapter given

The postflight actions have therefore not run. I don't know if this means anything else has failed. Thoughts? What, if anything, do I need to do to fix this upgrade?

Thanks
Peter

nicholas
Akeeba Staff
Manager

There is no post flight action necessary in this update but the message you are receiving is not normal. It means that Joomla has incorrectly recorded in its database that Akeeba Backup's extension type is library instead of package. We do not ship any library packages with Akeeba Backup 9. This is likely to cause update problems in the future.

I'd recommend the following.

Export all your backup profiles.

Keep a copy of the #__akeebabackup_backups table

Keep a copy of any backup archives you have in any folders under administrator/components/com_akeebabackup e.g. the default backup folder of administrator/components/com_akeebabackup/backups.

Uninstall the Akeeba Backup package. (NOT the component β€” the entire package).

Install Akeeba Backup afresh.

Import your exported backup profiles.

Restore your copy of the #__akeebabackup_backups table

Put back any backup archives you kept before.

This should fix the problems with Joomla's database.

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!

prh47bridge

Tried this and but got the same issue with the next update. I've also had the issue with JCH Optimize. Both that and Akeeba are correctly listed in the database.

The good news (kind of) is that I have some information that I thought you should know. I reported this on the Joomla bug tracker and it was closed as a duplicate of this ticket:Β Files are not copied on update Β· Issue #38956 Β· joomla/joomla-cms (github.com).Β  It seems that Joomla's com_joomlaupdate component can get confused when there are multiple updates and one of them is a package, resulting in the package being passed an adapter of the wrong type.

You may find this useful if other users report the same problem.

Regards

Peter

nicholas
Akeeba Staff
Manager

If you have noticed, the issue author of #38965 on Joomla's GitHub account is none other than yours truly :)

Yours is not the only time I have seen this problem. It has happened to other people. Another user who reported the same issue about a week after you gave me enough information to figure out why it could possibly happen, hence the issue I submitted.

For now, you have to follow the instructions I gave you and remember something important:

DO NOT TRY TO UPDATE TWO OR MORE EXTENSIONS AT ONCE USING JOOMLA'S EXTENSIONS UPDATE PAGE.

The way the extensions updater works will very likely cause an error.

Instead, select one extension, click on update. When it finishes, select another extension, click on update. Repeat until all extensions are updated. This way you will not bump into Joomla's bug when trying to update two separate extensions of a different type in the same request.

(Technically speaking, you could select all extensions of the exact same type, e.g. all packages OR all components OR all plugins OR all modules, without mixing them but this is too complicated for the average Joomla user so I am not going to even entertain it as a serious suggestion. It sounds complicated, it is very open to misunderstanding, it is not a good way to explain how things work)

For what it's worth, about ten years ago I had proposed a better way to do extension updates in Joomla, inspired by the way Debian's apt-get works. It was a multi-request process. First we start downloading packages, one at a time to avoid timeouts. Then we do one request per extension installation. Back then Joomla didn't have a way to push status messages through JavaScript. This is a problem long since resolved. I just need buy-in from production leadership to revive this proposal and fix Joomla's extensions updates as I have been trying to let me do for a decade, i.e. since the introduction of this feature in Joomla 1.6.

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!