Support

UNiTE, Remote CLI, eXtract Wizard

#37985 Unite 5.0.0 - argument must be of type array error

Posted in ‘UNiTE and Remote CLI’
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

PHP version
7.4
Tool
UNiTE
Tool version
n/a

Latest post by nicholas on Thursday, 03 November 2022 05:13 CDT

[email protected]

Hi,

We've been using an older version of Unite 3.0.1 with php 7.1 on AWS linux which has been working for us without any issues.

We've upgraded to Unite 5.0.0 and we're now using PHP 7.4 (we have also tested with PHP 8.1), but are getting errors when we try to run the restore command for our Joomla website.

Our xml file for a local JPA file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<unite>
        <siteInfo>
                <package>/tmp/site.jpa</package>
                <deletePackage>0</deletePackage>
                <emailSysop>1</emailSysop>
                <name>MyCompany</name>
                <email>[email protected]</email>
                <absolutepath>/var/www/html</absolutepath>
        </siteInfo>

        <databaseInfo>
                <database name="site">
                        <changecollation>0</changecollation>
                        <dbdriver>mysqli</dbdriver>
                        <dbhost>127.0.0.1</dbhost>
                        <dbuser>fakedbuser</dbuser>
                        <dbpass>fakedbpass</dbpass>
                        <dbname>joomla</dbname>
                        <dbprefix>abc_</dbprefix>
                </database>
        </databaseInfo> 
</unite>

php unite.phar restore -vvv command.xml

The output from unite.phar looks good to start with, but hits an issue with something relating to extracting the tmp file path:

Akeeba UNiTE 5.0.0 (2022-10-11) Copyright ©2008-2022 Nicholas K. Dionysopoulos / Akeeba Ltd. This program comes with ABSOLUTELY NO WARRANTY. This is Free Software and you are welcome to redistribute it under certain conditions. Use command license for details. [INFO ] Parsing /root/newunite/command.xml [INFO ] Validating the source data [INFO ] Renaming the existing .htaccess file [INFO ] Writing a stealth .htaccess file [INFO ] Extracting backup archive
500184888/500184888 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 7 secs/7 secs 8.0 MiB[INFO ] Checking ANGIE support [INFO ] Setting up the restoration script for unattended restoration [INFO ] Locking the web restoration script with a random password [INFO ] Detected site restoration platform: Joomla [INFO ] Resetting the restoration script [INFO ] Detecting the backed up site's CMS version [INFO ] Detecting the backed up site's configuration [INFO ] Starting restoration of database contents [INFO ] Restoring site database
100/100 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 12 secs/12 secs 10.0 MiB[INFO ] Reconfiguring Joomla
[ERROR ] Akeeba\UNiTE\Engine\Angie\JoomlaSetup::getTmpPath(): Argument #1 ($job) must be of type array, Akeeba\UNiTE\DataShape\JobDefinition given, called in phar:///root/newunite/unite.phar/Engine/Angie/JoomlaSetup.php on line 45
I've added some logging to dump out some information, and the 'job' might not be an array but an object, but I may not be looking at the right thing.

[INFO ] Starting restoration of database contents [INFO ] Restoring site database object(Akeeba\UNiTE\Application)#55 (19) { ["config":protected]=> object(Joomla\Registry\Registry)#53 (3) { ["data":protected]=> object(stdClass)#54 (10) { ["execution"]=> object(stdClass)#57 (3) { ["datetime"]=> string(19) "2022-11-02 15:18:13" ["timestamp"]=> int(1667402293) ["microtimestamp"]=> float(1667402293.076533) } ["cwd"]=> string(24) "/root/newunite/directory" ["logPath"]=> string(24) "/root/newunite/directory" ["tmpPath"]=> string(4) "/tmp" ["sourceFile"]=> string(14) "../command.xml" ["inboxDir"]=> string(2) ".." ["verbose"]=> bool(true) ["quiet"]=> bool(false) ["job"]=> object(Akeeba\UNiTE\DataShape\JobDefinition)#116 (11) { ["_flagAllowArbitrary":protected]=>

I've tried with extra options in the XML and trying to set things on the command line for tmp files etc, but can't see how to get around this,

The backup we are restoring was created with Akeeba Backup Professional 8.2.1 (2022-10-10).

 

Thanks in advance for any assistance you can provide.

Neil

nicholas
Akeeba Staff
Manager

It looks like a made a typo in that method declaration when I was merging the 5.0 to development. Please download and use this dev release: https://www.akeeba.com/download/unite-dev/5-0-1-dev202211030845-rev87303ab.html

Please do let me know if that works for you as it does for me so I can make a new release.

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!

[email protected]

Hi Nicholas,

 

I've tried the new version and the issue is not occurring anymore.

Thanks for the help.

 

Neil

nicholas
Akeeba Staff
Manager

Thank you very much for the confirmation.

Have a great day, Neil!

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!