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鈥檒l 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
Member

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
  • install 3.5.0 stable or staging (you can also use the result of the first test)
  • install com_patchtester
  • apply this fix of com_patchtester: joomla-extensions/patchtester#133
  • apply this patch
  • go to com_joomlaupdate
  • notice the new layout
  • try the reinstall feature
  • try the upload and install freature

For the code reviewer

The changes between the code by @nikosdion and me can be found here: nikosdion/joomla-cms@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)

nikosdion and others added 30 commits Mar 11, 2016
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.
Bug fixes
* Missing token
* Typo in JoomlaupdateControllerUpdate::captive()
* We must store the base name, not the full path to the captive file
Minor Fixes
@Webdongle

This comment has been minimized.

Copy link
Contributor

Webdongle commented Apr 7, 2016

@wilsonge

Where is the stand alone update component ? can I have a link please ?


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

@wilsonge

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

brianteeman commented Apr 7, 2016

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

@wilsonge

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

Webdongle commented Apr 7, 2016

Thanks @brianteeman @wilsonge

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

@brianteeman

This comment has been minimized.

Copy link
Contributor

brianteeman commented Apr 7, 2016

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 notifications@github.com 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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor

rdeutz commented Apr 12, 2016

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

@joomla-cms-bot

This comment has been minimized.

Copy link

joomla-cms-bot commented Apr 12, 2016

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

This comment has been minimized.

Copy link
Member Author

zero-24 commented Apr 12, 2016

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

@richard67

This comment has been minimized.

Copy link
Member

richard67 commented Apr 12, 2016

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"

This comment has been minimized.

Copy link
@andrepereiradasilva

This comment has been minimized.

Copy link
@brianteeman
COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_DIRECTORY="FTP Root"
COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="We can't find a download URL"
COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC="An update to Joomla %1$s was found, but it wasn't possible to fetch the download URL for that update. There are two possibilities why this happens:<br>- Your host doesn't support <a href="_QQ_"https://www.joomla.org/technical-requirements.html"_QQ_">the minimum requirements for Joomla %1$s</a> and there is no alternative download for your configuration available.<br>- There is a problem with Joomla Update Server.<br><br>Please try to download the update package from <a href="_QQ_"https://www.joomla.org/download.html"_QQ_">the official Joomla download page</a> and use the Upload and Install tab."
CCOM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_DIRECTORY="FTP Root"

This comment has been minimized.

Copy link
@andrepereiradasilva
brianteeman and others added 2 commits Apr 12, 2016
remove CCOM and replace with COM
@joomla-cms-bot

This comment has been minimized.

Copy link

joomla-cms-bot commented Apr 13, 2016

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

This comment has been minimized.

Copy link
Member 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
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@zero-24 zero-24 deleted the zero-24:feature/joomlaupdate-reinstall branch Apr 13, 2016
@brianteeman brianteeman added New Feature and removed RTC labels May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can鈥檛 perform that action at this time.