? ? Pending
Related to # 16494

User tests: Successful: Unsuccessful:

avatar SamuelSchepp
SamuelSchepp
28 Aug 2017

Summary of Changes

Based on #16494 we continued developing the Pre-Update Checker for Joomla! 3.9. Like the Joomla! installation process, the com_joomlaupdate component now checks PHP options, settings and extension compatibility.
The evaluation process is currently a copy of the installation process pre-checker.
The translation of extension names is duplicated from com_installer.
Future PRs should address these issues by moving these functions to a core library.

Conditional checks:

If next J! version >= 4:
  • Check for unsupported database types (sqlsrv, sqlazure)
If PHP version of next J! < 7:
  • Magic Quotes (+ Runtime)
  • Register Globals
  • Safe Mode

Testing Instructions

These instructions are based on a Joomla 3.9 installation.
Change values accordingly.
The path / represents the Joomla! installation directory.

Test Joomla! Pre-Update Check

  1. Create file list.xml at /
<extensionset>
	<extension element="joomla" type="file" version="4.0.0" targetplatformversion="3.9" detailsurl="http://localhost/extension_sts.xml" />
</extensionset>
  1. Create file extension_sts.xml at /
<updates>
	<update>
		<name>Joomla! 3.7</name>
		<description>Joomla! 3.7 CMS</description>
		<element>joomla</element>
		<type>file</type>
		<version>4.0.0</version>
		<infourl title="Joomla!">https://www.joomla.org/announcements/release-news/5711-joomla-3-7-5-release.html</infourl>
		<downloads>
			<downloadurl type="full" format="zip">https://downloads.joomla.org/cms/joomla3/3-7-5/Joomla_3.7.5-Stable-Update_Package.zip</downloadurl>
		</downloads>
		<tags>
			<tag>stable</tag>
		</tags>
		<maintainer>Joomla! PLT</maintainer>
		<maintainerurl>https://www.joomla.org</maintainerurl>
		<section>STS</section>
		<targetplatform name="joomla" version="3.[23456789]" />
		<php_minimum>7.0</php_minimum>
	</update>
</updates>
  1. Components -> Joomla! Update -> Options

Custom URL: localhost/list.xml

  1. Save & Close

There should be a fake update to Joomla 4.

  1. Change your PHP or webserver settings to trigger a failed compatibility check.

display_errors = On

file_uploads = Off

output_buffering = On

  1. Run chmod -w configuration.php to disable write on the configuration file.

  2. Visit the update site and check the compatibilty results.

Test Extension Compatibility

  1. Install some extensions, which are not compatible with your hacked Joomla! target version (4.0.0).

  2. Change the XML Update-URL of any incompatible extension in the table #__update_sites in the column location to an own custom XML file.

  3. Put the following contents in your XML update file. Replace version 1.5 with the actual installed version of your selected extension.

<updates>
	<update>
		<version>1.5</version>
		<downloads>
			<downloadurl type="full" format="zip">https://fakeurl</downloadurl>
		</downloads>
		<targetplatform name="joomla" version="4.0.0" />
	</update>
</updates>
  1. Check the extensions compatiblity result.

  2. Change the column manifest_cache in the table #__extensions of the hacked extension by changing the field version to an older one. This should trigger a compatiblilty, but based on a newer version.

Test Database compatibility

Add your current database type (e.g. mysqli) to $unsupportedDatabaseTypes in function isDatabaseTypeSupported() in file ./administrator/components/com_joomlaupdate/models/default.php.

Expected result

You should see a full report on compatibility of the update. PHP options, settings and extensions should be marked accordingly.
An incompatible database type should cause the message "Your host doesn't support the minimum requirements for Joomla".
preupdate1
preupdate2

Actual result

No results, since this is a new feature.

Documentation Changes Required

The following page should be updated with recent screenshots and descriptions.
https://docs.joomla.org/J3.x:Updating_from_an_existing_version

Developed @icampus, @SamuelSchepp, @Kev1n337, @DrDreave

avatar joomla-cms-bot joomla-cms-bot - change - 28 Aug 2017
Category Administration com_joomlaupdate Language & Strings JavaScript
avatar SamuelSchepp SamuelSchepp - open - 28 Aug 2017
avatar SamuelSchepp SamuelSchepp - change - 28 Aug 2017
Status New Pending
avatar roland-d roland-d - change - 28 Aug 2017
Rel_Number 16494
Relation Type Related to
avatar roland-d
roland-d - comment - 28 Aug 2017

@wilsonge Can you have a look?

avatar roland-d
roland-d - comment - 28 Aug 2017

@SamuelSchepp I think it will be good to include the image of how it should look like on screen to your post as well.

avatar SamuelSchepp SamuelSchepp - change - 28 Aug 2017
The description was changed
avatar SamuelSchepp SamuelSchepp - edited - 28 Aug 2017
avatar brianteeman
brianteeman - comment - 28 Aug 2017

Is there really any point in adding to the preupdate checker tests for things that would have prevented joomla installing in the first place. For example if Joomla 3.9 can not be installed if you have magic quotes enabled then there is no need to test for it here as it can only ever give one result

avatar SamuelSchepp SamuelSchepp - change - 29 Aug 2017
Labels Added: ? ?
avatar roland-d
roland-d - comment - 29 Aug 2017

Is there really any point in adding to the preupdate checker tests for things that would have prevented joomla installing in the first place.

Besides the PHP version all settings are hardcoded so we can't know beforehand if they have changed or not. The only thing we can do is filter out settings that are no longer relevant due to the PHP version, such as the Magic Quotes and Register Globals.

The other settings may have been correct during installation but may have changed afterwards due to server changes or moving sites. So I think having these checks in place is just informative to the user.

The only thing I think can be left out is the configuration.php check because this file is not going to be changed during an update.

avatar Kev1n337
Kev1n337 - comment - 29 Aug 2017

We just improved the language keys and removed the magic quotes, register globals and configuration.php checks as these aren't required for an update to future Joomla versions. We think that the other checks are still useful as they could have changed after the installation.

avatar brianteeman
brianteeman - comment - 29 Aug 2017

Check for database support.

Is this check enough? The site could be installed on sql but this is not supported in 4.0

avatar roland-d
roland-d - comment - 29 Aug 2017

@brianteeman Very good point about the SQL Server installation. We will check this as well.

avatar brianteeman
brianteeman - comment - 29 Aug 2017

Sorry I might have jumpe3d the gun a bit with some of my comments. I was assuming that this would only be for updates from 3.9 to 4 but of course it can be for updates from 3.9.0 to 3.9.1 in which case the comments I made about supported php version are not correct. I would suggest that instead of removing those things I highlighted we check the current php version first (i am assuming we cant check which version we are updating to - but might be wrong) and only check those things if we are on <7.0

avatar SamuelSchepp
SamuelSchepp - comment - 29 Aug 2017

We have access to the required PHP version via the update xml file. We now only show specific checks, if they are usefull for the target PHP or Joomla version.

  • Database Types if Joomla version is >= 4.
  • Magic Quotes (+ Runtime), Register Globals and Safe Mode if the target PHP version is < 7.
avatar brianteeman
brianteeman - comment - 29 Aug 2017
avatar brianteeman
brianteeman - comment - 29 Aug 2017

I dont think your php version check is working

screenshotr10-55-44

avatar SamuelSchepp
SamuelSchepp - comment - 29 Aug 2017

@brianteeman This is caused by a missing or wrong <php_minimum> tag. We just fixed this in the test instructions. It should say 7.0.

avatar SamuelSchepp SamuelSchepp - change - 29 Aug 2017
The description was changed
avatar SamuelSchepp SamuelSchepp - edited - 29 Aug 2017
avatar brianteeman
brianteeman - comment - 29 Aug 2017

@SamuelSchepp thanks - that resolved that issue

avatar zero-24
zero-24 - comment - 29 Aug 2017

I have just left some coments + applyed some major CS changes to this file: 30f28f8

avatar SamuelSchepp SamuelSchepp - change - 30 Aug 2017
The description was changed
avatar SamuelSchepp SamuelSchepp - edited - 30 Aug 2017
avatar SamuelSchepp SamuelSchepp - change - 30 Aug 2017
The description was changed
avatar SamuelSchepp SamuelSchepp - edited - 30 Aug 2017
avatar SamuelSchepp SamuelSchepp - change - 30 Aug 2017
The description was changed
avatar SamuelSchepp SamuelSchepp - edited - 30 Aug 2017
avatar SamuelSchepp SamuelSchepp - change - 30 Aug 2017
The description was changed
avatar SamuelSchepp SamuelSchepp - edited - 30 Aug 2017
avatar Kev1n337
Kev1n337 - comment - 30 Aug 2017

@brianteeman @wilsonge @zero-24 @Quy
Thank you for your feedback. We finished improving our pull request and corrected everything you pointed out in your reviews. Could you please test again?

avatar brianteeman
brianteeman - comment - 30 Aug 2017

Sorry I should have noticed this before but on a small screen you may not even see the check before doing the update - see screenshot

So why not move all of this pre-upgrade check to a tab and make it the very first tab - then there can be no excuse for someone not seeing it

screenshotr15-12-36

avatar brianteeman
brianteeman - comment - 30 Aug 2017

Just to see what happened i set the php version required to 7.5 in the xml and below is the screen that i got

screenshotr15-18-26

To me this text suggests that I should either come back later and try again or download it manually and use the upload and update functionality

The text that i dont meet the minimum requirements is buried in the middle of text which is titled We can't find a download URL

avatar brianteeman
brianteeman - comment - 30 Aug 2017

Hathor template

I know as a general rule we are not adding new features to hathor but i think its important for this update screen. In general everything works ok apart from the extension compatibiity

screenshotr15-44-18

I thought this was because the class for the background was missing from the template and the text was white but that wasnt the case. There is no content there to show if something is compatible or not

avatar wilsonge
wilsonge - comment - 30 Aug 2017

screen shot 2017-08-31 at 00 16 08

This looks awesome. I managed to successfully test with extensions that supposedly do and don't support Joomla 4.

I agree with @brianteeman let's add some hathor styling for this case. I do also agree that there's probably some styling and text tweaks to be made, but given you guys finish tomorrow (I believe) let's get this finished and merged so everyone can make pull requests on the finished product :)

Also I'm very impressed you've managed to make @dgt41 happy with your javascript on the first go. It's a hard feat to achieve!

avatar brianteeman
brianteeman - comment - 30 Aug 2017

If for any reason you dont manage to complete it then it shouldn't be too hard to add the finishing touches

avatar joomla-cms-bot joomla-cms-bot - change - 31 Aug 2017
Category Administration com_joomlaupdate Language & Strings JavaScript Administration com_joomlaupdate Language & Strings Templates (admin) JavaScript
avatar Kev1n337
Kev1n337 - comment - 31 Aug 2017

Thanks again for your suggestions! We fixed the issue with the hathor template and added the missing since-tag.

@brianteeman We also moved the Compatibility Check to a tab and display it in the first place.

We also discussed your suggestion about the We can't find a download URL notice when a higher PHP version is required. We agree that this is not the best error description, but we didn't change anything so testing the same thing in staging or the 3.9-dev branch results in the same error description. The only thing we implemented is showing this screen too, when your db-type is not supported by the new update (sqlsrv or sqlazure in J!4) instead of allowing the user to update. More intuitive error descriptions for different situations should be part of a future pull request.

avatar SamuelSchepp
SamuelSchepp - comment - 31 Aug 2017

Could you please test again, as we are (hopefully) done.

avatar brianteeman
brianteeman - comment - 1 Sep 2017

Other than the "We can't find a download URL notice when a higher PHP version is required."
issue which does need to be resolved somehow all the issues I have raised have been resolved.

@wilsonge I guess it can be merged as is and then a new Release Blocker issue created for the above which will need to be resolved.

avatar wilsonge wilsonge - change - 1 Sep 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-09-01 10:18:54
Closed_By wilsonge
avatar wilsonge wilsonge - close - 1 Sep 2017
avatar wilsonge wilsonge - merge - 1 Sep 2017
avatar wilsonge
wilsonge - comment - 1 Sep 2017

Thankyou so much to the @icampus students - @SamuelSchepp, @Kev1n337, @DrDreave for all the hard work you've put into this. It's a great effort!

avatar Kev1n337
Kev1n337 - comment - 3 Sep 2017

I just opened a new pull request handling the new error descriptions, instead of always showing "We can't find a download url".
#17849

avatar nikosdion
nikosdion - comment - 9 Sep 2017

If I have a package extension which contains ten extensions and the update URL is only for the package am I correct in understanding that will show all ten extensions as "no compatibility information"? If not, what happens if an extension does not have an update XML info URL at all? Do we simply ignore it on update and hope for the best? I'm sure it's discussed somewhere, I just can't find where.

Also, I came here from the call to action you posted on Facebook. The information on this PR are not sufficient for a developer to understand what the call to action asks them to do. Please clarify. Do we have to just make sure we have a target platform in our update files or do we need to do something more?

avatar SamuelSchepp
SamuelSchepp - comment - 9 Sep 2017

All extensions in a package have a package ID, which points to the root extension, which should have the update XML url. In this case, this is the only entry we show.

Extensions without any update XML url will show "Missing Compatibility Tag". Here we have no information and should consult the developer or "hope for the best".

You can test your Update XML file, by applying the test instructions. You file needs a target platform, version and download url. Just make sure the update checker shows the correct information for your extension.

Some discussion happened here #16494.

avatar nikosdion
nikosdion - comment - 10 Sep 2017

All extensions in a package have a package ID, which points to the root extension

So, if I understand correctly, if they don't (the user extracted the package and installed the extensions manually) they will appear as "Missing Compatibility Tag. OK, I know how to work around that in my code that checks the health of update sites.

Extensions without any update XML url will show "Missing Compatibility Tag". Here we have no information and should consult the developer or "hope for the best".

Thank you for confirming. I will need to document that for my users.

You can test your Update XML file, by applying the test instructions.

The test instructions tell me how to convince Joomla! that there is a version 4 with such and such minimum requirements. I already know how to do that. I wrote Joomla! Update :D The reason I added the custom update source feature was exactly that kind of testing. But that's not what I asked.

I am asking what do I need on my extension's XML file. I can infer from the code that I just need to add a target platform and target a specific Joomla! version. Reading #16494 -which I had done before I commented here- I also got no definitive reply to my question. Again, I inferred from the code. Can you please confirm that I just need a target platform in my extension's update XML file as accessed by the Update Site URL? Thanks.

avatar SamuelSchepp
SamuelSchepp - comment - 10 Sep 2017

You need the tags version, downloadurl and targetplatform. We built upon the logic of JUpdate and these tags are needed for JUpdate to accept an update.

avatar SamuelSchepp SamuelSchepp - change - 7 Jun 2018
The description was changed
avatar SamuelSchepp SamuelSchepp - edited - 7 Jun 2018
avatar zero-24
zero-24 - comment - 29 Sep 2020

This has been documented: https://docs.joomla.org/Pre-Update_Check by @bayareajenn and now been updated to the new screenshots by me.

avatar bayareajenn
bayareajenn - comment - 29 Sep 2020

This has been documented: https://docs.joomla.org/Pre-Update_Check by @bayareajenn and now been updated to the new screenshots by me.

Thank you, Tobias.

Add a Comment

Login with GitHub to post a comment