? Pending

User tests: Successful: Unsuccessful:

avatar nikosdion
nikosdion
6 Aug 2019

This commit syncs restore.php with the latest upstream development, including tentative PHP 7.4 support.

See gh-25782 for context

Summary of Changes

Updates com_joomlaupdate's restore.php. The main change you'll notice is tentative PHP 7.4 support. I call it tentative because at the time of this writing I do not have a working PHP 7.4 installation; I just followed the clues in the gh-25782 issue.

Testing Instructions

Run an update.

Documentation Changes Required

No impact.

avatar nikosdion nikosdion - open - 6 Aug 2019
avatar nikosdion nikosdion - change - 6 Aug 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Aug 2019
Category Administration com_joomlaupdate
avatar HLeithner
HLeithner - comment - 8 Aug 2019

I tried to update update from 3.9.2 to 3.9.11 with this restore.php but failed with "Invalid Login".

Also 3.9.11 to 3.9.11 doesn't work with the same error. Any idea?

avatar HLeithner HLeithner - change - 8 Aug 2019
Labels Added: ?
avatar nikosdion
nikosdion - comment - 8 Aug 2019

I need to update the JavaScript on com_joomlaupdate. I hadn't realised that the restore.php you had was truly ancient. However, there are two problems with that.

  1. There is no documentation on the code style for JavaScript. I already cancelled a planned contribution for J4 because I can't spend an infinite amount of time trying to guess the elusive coding standard or deal with the Hound's idiotic feedback which makes no sense.

  2. During the update restore.php would be overwritten. At this point all future requests would fail because the JS already in the browser is out of date. The only way to deal with that is have users install a separate update to Joomla Update BEFORE updating Joomla itself. This is something we had to do in the past for the same reason (when we added hardening to restore.php sometime around Joomla! 3.4 IIRC).

The latter issue is basically one of communication and you should be able to handle it. The first issue is, at the moment, a hard contribution block for me. If someone gives me instructions for automatically applying JS code style with phpStorm I can resume my contributions which require JavaScript changes. If you can't you either commit to accept my contributions despite JS code style errors OR you lose me as a contributor. Rule number 1 for keeping contributors is to not make them feel their time is not appreciated by the project.

avatar nikosdion
nikosdion - comment - 8 Aug 2019

I think it's best if you just modify your current restore.php for PHP 7.4 compatibility and add a header notice. I'm not touching Joomla's JS code with a 30-foot pole seeing what kind of things its JS coding style wants me to do.

avatar nikosdion nikosdion - change - 8 Aug 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-08-08 16:44:13
Closed_By nikosdion
avatar nikosdion nikosdion - close - 8 Aug 2019
avatar HLeithner
HLeithner - comment - 9 Aug 2019

Thank you for you try and I have the same opinion to make our restore.php php 7.4 compatible is a much safer and easier step then upgrading to your version.

avatar richard67
richard67 - comment - 9 Aug 2019

@HLeithner What about @nikosdion 's request for some JS code style docs? Do you know where to address that issue? Or could we link to some Hound docs in our docs? I don't want this to be ignored because don't want to block him and others from contributing. We currently have a lack of JS experts - I am pretty sure not one.

Update: Ah, I see it's about PHP code style. But that doesn't change that we should not block people from contributing.

Add a Comment

Login with GitHub to post a comment