Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joomla! Update: reinstall Joomla! and Update & Install features | seccond try #9612

Merged
merged 89 commits into from
Apr 13, 2016

Conversation

zero-24
Copy link
Contributor

@zero-24 zero-24 commented Mar 26, 2016

Pull Request for Issue #9469.

Summary of Changes

Added features to Joomla! Update:

  • Reinstall. If you're already on the latest version you are given the option to re-download the full update package and install it on top of your site. Useful if someone has made core hacks and you want to undo them.
  • Upload & Update. Now that we have removed the ability to install Joomla! as an extension to itself the users with no FTP access and/or no outbound server Internet access (e.g. behind a corporate DMZ firewall) are unable to update. We now have the option to upload the update package. Since this is dangerous and could potentially be abused you need to re-enter your login information after the upload and before the uploaded package is installed. Failure to comply removes the uploaded file.

Testing Instructions

First test
UPDATE  `#__update_sites` SET  `location` =  'http://www.jah-tz.de/downloads/extensions/dev/com_joomlaupdate.xml' WHERE  `location` = 'http://update.joomla.org/core/extensions/com_joomlaupdate.xml';
Note

Please notice that as the 3.5.0 stable package don't include the changes here the new overview is gone for now. But if you follow the seccond test it come back 😄

seccond test

For the code reviewer

The changes between the code by @nikosdion and me can be found here: https://github.com/nikosdion/joomla-cms/compare/feature/joomlaupdate-reinstall...zero-24:feature/joomlaupdate-reinstall

Some other things

The needed update xml for com_joomlaupdate can be found here: joomla/update.joomla.org#6

The com_joomlaupdate package can be found here (it is the same as on my server for updating):
http://www.jah-tz.de/downloads/download.php?file=com_joomlaupdate.zip&folder=extensions/dev/

Limitations of using the com_joomlaupdate standalone. (edit)

You can't use the reinstall feature as the standalone package don't update the updater lib file please see: #9612 (comment)

Thanks

Thanks goes to @nikosdion @wilsonge and @mbabker and com_patchtester (as there we can find how we should create a update packages)

Nicholas K. Dionysopoulos and others added 30 commits March 11, 2016 10:36
Add type hints to Joomla! Update's controller
Refactored JUpdater, made it possible to record the current version of an extension into the #__updates table
Model and view template changes
When JUpdater::findUpdates has four (or more) parameters we can use the reinstall support by passing true in the fourth parameter (includeCurrent). Otherwise we have to call findUpdates with three parameters which only gives us available updates. This is necessary since Joomla! Update can run under older Joomla! 3.x releases, most notably 3.4, which lack the reinstall support.
While the FTP credentials were applied, the file write method was ignored. That explains why a buch of users reported that Joomla! Update didn't work for them.

Since the included restore.php supports the Hybrid file write mode (direct file writes where possible, FTP only when the file is unwriteable) I added that option as well.
* Missing token
* Typo in JoomlaupdateControllerUpdate::captive()
* We must store the base name, not the full path to the captive file
@wilsonge
Copy link
Contributor

wilsonge commented Apr 7, 2016

The "standalone" component is exactly what we ship in the CMS right now - you can generate the standalone package by running this script https://github.com/joomla/joomla-cms/blob/staging/build.xml#L142 - I haven't had time to do it myself yet so i can't link you to a package

@brianteeman
Copy link
Contributor

Whoever said it wont be merged. This is RTC with a milestone of 3.5.2

@wilsonge
Copy link
Contributor

wilsonge commented Apr 7, 2016

This as is is going to be merged. All we are going to do is also produce a zip of exactly this that people can upload onto older Joomla sites (especially people still stuck on 3.4.8)

@Webdongle
Copy link
Contributor

Thanks @brianteeman @wilsonge

I obviously misunderstood.... I thought the stand alone zip was instead of having it in the core.

@brianteeman
Copy link
Contributor

No it will be in core but by making it something that can be installed it
can be installed in earlier releases of joomla but more importantly it
allows for the situation where we need to change the updater BEFORE someone
can update their joomla release.

On 7 April 2016 at 22:11, Kevin Griffiths [email protected] wrote:

Thanks @brianteeman https://github.com/brianteeman @wilsonge
https://github.com/wilsonge

I obviously misunderstood.... I thought the stand alone zip was instead of
having it in the core.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9612 (comment)

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

@mbabker
Copy link
Contributor

mbabker commented Apr 7, 2016

For reference we made it possible to do this after 3.3.6 needed to be released because of an issue introduced into the restore.php script. The mechanism has never been needed though.

@rdeutz
Copy link
Contributor

rdeutz commented Apr 12, 2016

@zero-24 could you have a look at the merge conflicts, danke

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @richard67, @Webdongle


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9612.

@zero-24
Copy link
Contributor Author

zero-24 commented Apr 12, 2016

Fixed @rdeutz but please double check with @wilsonge about this PR.

@richard67
Copy link
Member

I will be able to test again tomorrow if still necessary then.

COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PASSWORD="FTP password"
COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PORT="FTP port"
COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_USERNAME="FTP username"
CCOM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_DIRECTORY="FTP Root"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CCOM?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joomla-cms-bot
Copy link

This PR has received new commits.

CC: @richard67, @Webdongle


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9612.

@zero-24
Copy link
Contributor Author

zero-24 commented Apr 13, 2016

Sorry guys i have just fixed it by merging brian's PR thanks @andrepereiradasilva & @brianteeman

@rdeutz rdeutz merged commit c05e6b1 into joomla:staging Apr 13, 2016
@zero-24 zero-24 deleted the feature/joomlaupdate-reinstall branch April 13, 2016 12:38
@rdeutz rdeutz modified the milestones: Joomla 3.5.2, Joomla! 3.6.0 May 1, 2016
@brianteeman brianteeman added Feature and removed RTC This Pull Request is Ready To Commit labels May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.