Support

UNiTE, Remote CLI, eXtract Wizard

#24423 com_akeeba forgotten in $url => remote download fails ($this->_component empty param)

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
n/a
Tool
UNiTE
Tool version
n/a

Latest post by jmsantoni on Thursday, 11 February 2016 10:30 CST

jmsantoni
 Hello,

I have an issue with Unite 2.0.2, it fails to download remote archive parts as the $url is missing "option=com_akeeba" (if using Akeeba Backup for Joomla of course....) in remote step.

it is the same behaviour either I set or not <component>com_akeeba</component> in XML unattended file.

with unite 2.0.1, $url is something like : http://<my_host>/index.php?option=com_akeeba&view=json&json=%7B%22encapsulation%22%3A1%2C%22body%22%3A%22%7B%5C%22..........

with unite 2.0.2, $url is : http://<my_host>/index.php?view=json&json=%7B%22encapsulation%22%3A1%2C%22body%22%3A%22%7B%5C%22..........

After further investigation, it is due to variable parameter $this->_component, that is empty in prepareQuery function.

Re-assigning value to a $component variable does the trick in doQuery function, before manipulating $component variable :
$component = $this->_component;
$query = '';
$component = strtolower($component);
..........

Hope this helps;
release a 2.0.3 ;-) ?

Kind regards,
JM Santoni

jmsantoni
Sorry, I meant in prepareQuery...

$query = '';
$component = $this->_component;
$component = strtolower($component);

if (!empty($component) && (substr($component, 0, 4) == 'com_'))
{
$query .= 'option=' . $component . '&';
}
..........

tampe125
Akeeba Staff
Hello Jean,

could you please attach your XML file, so I can actually test with your settings?
Please remember to zip it before uploading it, otherwise it will be blocked by our firewall.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jmsantoni
Hi Davide,

here is the XML attached (I removed passwords).

I've copied the logs from cron, a bit modified to get useful information, this is my results.

With the original release of Unite 2.0.2 : it fails downloading the first part of the archive, because option=com_akeeba is not added to the $url. Here is an extract of the logs leading to a fail :
-------------------------------------------
La valeur de $component est : com_akeeba
Got backup tick
Progress: 100%
Domain : finale
Step :
Substep :

La valeur de $component est : com_akeeba
Got backup tick
Progress: 100%
Domain : finale
Step :
Substep :

La valeur de $component est : com_akeeba
Finished backing up the remote site
Downloading backup with http method
La valeur de $component est : com_akeeba

log dans prepareQUERY
La valeur de $component est avant strtolower :
La valeur de $component est avant test component vide :
URL = http://www.boussargues.com/index.php?view=json&json=%7B%22encapsulation%22%3A1%2C%22body%22%3A%22%7B%5C%22method%5C%22%3A%5C%22downloadDirect%5C%22%2C%5C%22data%5C%22%3A%7B%5C%22backup_id%5C%22%3A128%2C%5C%22part_id%5C%22%3A1%7D%2C%5C%22challenge%5C%22%3A%5C%22535c3647a80b229c9b26867eb61f4875%3Ae3ef7775d95b6a98a7e826a788ac8ff3%5C%22%7D%22%7D&format=html&tmpl=componentCould not download inbox/site-BOUSSARGUES_30-quotidien-4.jps -- 22 : The requested URL returned error: 500 Internal Server Error

-------------------
After adding this line in prepareQuery function : $component=$this->_component; Here are the logs leading to a success :
-----------------------

La valeur de $component est : com_akeeba
Got backup tick
Progress: 88%
Domain : finale
Step : Post-processing
Substep : site-BOUSSARGUES_30-quotidien-4.j06

La valeur de $component est : com_akeeba
Got backup tick
Progress: 100%
Domain : finale
Step :
Substep :

La valeur de $component est : com_akeeba
Got backup tick
Progress: 100%
Domain : finale
Step :
Substep :

La valeur de $component est : com_akeeba
Finished backing up the remote site
Downloading backup with http method
La valeur de $component est : com_akeeba

log dans prepareQUERY
La valeur de $component est avant strtolower : com_akeeba
La valeur de $component est avant test component vide : com_akeeba
La valeur de $component est apres test component vide : com_akeeba
URL = http://www.boussargues.com/index.php?option=com_akeeba&view=json&json=%7B%22encapsulation%22%3A1%2C%22body%22%3A%22%7B%5C%22method%5C%22%3A%5C%22downloadDirect%5C%22%2C%5C%22data%5C%22%3A%7B%5C%22backup_id%5C%22%3A129%2C%5C%22part_id%5C%22%3A1%7D%2C%5C%22challenge%5C%22%3A%5C%22ec625df6092210f75014236661a67896%3Adbdcf6b302077e51e62f4b9609ab7075%5C%22%7D%22%7D&format=html&tmpl=component

........ etc...... etc....

La valeur de $component est avant strtolower : com_akeeba
La valeur de $component est avant test component vide : com_akeeba
La valeur de $component est apres test component vide : com_akeeba
URL = http://www.boussargues.com/index.php?option=com_akeeba&view=json&json=%7B%22encapsulation%22%3A1%2C%22body%22%3A%22%7B%5C%22method%5C%22%3A%5C%22downloadDirect%5C%22%2C%5C%22data%5C%22%3A%7B%5C%22backup_id%5C%22%3A129%2C%5C%22part_id%5C%22%3A7%7D%2C%5C%22challenge%5C%22%3A%5C%2293d6f7871ee341227172147574cac47c%3A51a1ebc7976415807bbbed86a88f261d%5C%22%7D%22%7D&format=html&tmpl=component
Archive downloaded successfully
Downloaded file is inbox/site-BOUSSARGUES_30-quotidien-4.jps
La valeur de $component est : com_akeeba
Running s3
Running stealth
Writing a stealth .htaccess (direct access)

---------------

Hope this helps;
JM Santoni

tampe125
Akeeba Staff
Thank you very much for your report!
I just fixed it, you'll find the new code in the next release.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

jmsantoni
Thanks Davide

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!