Remove progressbar.js dependency from com_joomlaupdate#6769
Remove progressbar.js dependency from com_joomlaupdate#6769dgrammatiko wants to merge 9 commits intojoomla:stagingfrom dgrammatiko:_update_progressbar_bootstrap
Conversation
|
@nikosdion Nikola can you take a look at this one, as I struggle to get the update.js to jquery as a 1 to 1 conversion and I don’t won’t to touch restore.php? |
|
If you find yourself in need to touch restore.php you are doing something extremely wrong! In fact, com_joomlaupdate's Javascript was backported from jQuery to mooTools when I contributed this feature. The newer version of the jQuery code is now part of Akeeba CMS Update and you can find it at https://github.com/akeeba/cmsupdate/blob/master/component/media/js/common.js Please keep in mind that CMS Update uses a private copy of jQuery in the cmsupdate.jQuery object. You need to change cmsupdate.jQuery to window.jQuery. The methods you need to copy are doEncryptedAjax, pingExtract, startExtract, stepExtract, finalizeUpdate and also the functions empty and is_array (the latter two come from the awesome php.js library). Normally my Javascript is licensed under GPLv3 but I do give my permission to relicense it under "GPLv2 or any later version published by the Free Software Foundation" which is compatible with Joomla!. And thus, with one swift change, you can remove all mooTools dependencies from Joomla! Update. You're welcome :) |
|
@nikosdion First and foremost mille grazie for your code! Once again! @wilsonge can you also check update.js in this PR? Do we need another comments block or this is fine? |
|
Can you give me some time to review it until Monday evening? My laptop was stolen, I replaced it, but now I have to get everything properly set up. |
|
WOW that sucks! I hope you’ve got at least a backup of all the precious staff of your laptop. No rush here... |
|
I can see that the total size of the update file being extracted (and, as a result, the percentage done) is always zero. |
|
@nikosdion Thanks Nick, I changed the script to reflect on values: |
|
In file administrator/components/com_joomlaupdate/controller.php change line 46 from $model = $this->getModel($vName);to $model = $this->getModel('default');This should fix the fatal error. |
|
@test successfully. Thanks 👍 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6769. |
|
@losedk do you have few minutes spare to test this one? |
|
@DGT41 Just tested. No errors on update, so I guess that's a successful test :) |
|
@test on staging + 6769.diff. It has worked perfectly! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6769. |
|
Great 😄 RTC! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6769. |
|
Merged to |


This is similar to #5386
Use the bootstrap javascript for rendering the progress bar
bootstrap.frameworkis always loaded in ISIS and HATHOR so it’s better to use that library instead of loading one more script!B/C
The html markup is changed
The relative js file is not loaded anymore
Testing
Try to install a 3.4 site apply this patch and then update it to 3.4.1 or the latest staging
Or if you are already on staging, do this:
Apply this PR
In the #__extensions table find the row with extension_id=700 and edit the manifest_cache field. Change the "version":"3.4.2-dev" part of it with "version":"3.4.0"
Edit the libraries/cms/version/version.php file and change public $DEV_LEVEL = '2-dev'; (your version may be different!) to public $DEV_LEVEL = '0';
Now login to administrator and update joomla!
You should see a progress bar like this:
This removes one more Mootools dependency, yay!