No Code Attached Yet bug
avatar Kostelano
Kostelano
20 Mar 2024

Steps to reproduce the issue

I use the DEFAULT update channel. There is a problem with updating to beta 2.

Technical requirements have been met, based on the information on the page https://manual.joomla.org/docs/next/get-started/technical-requirements.

PHP 8.1,
MariaDB 10.8,
Apache 2.4

Screenshot_1

avatar Kostelano Kostelano - open - 20 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Mar 2024
avatar Kostelano
Kostelano - comment - 20 Mar 2024

If you change the channel, for example, to Testing and select the Beta level (and earlier), you can update. In all other cases, failure.

avatar Kostelano Kostelano - change - 20 Mar 2024
The description was changed
avatar Kostelano Kostelano - edited - 20 Mar 2024
avatar richard67
richard67 - comment - 20 Mar 2024

@Kostelano From which version are you updating? From 5.1.0-beta1? Or from a nightly (something with "-dev" at the end of the version)? Or from 5.0.3?

avatar Kostelano
Kostelano - comment - 20 Mar 2024

Just in case, I just installed a completely virgin version of 5.1-beta1 and the problem is the same.

From version 5.0.3 it is impossible to get the same problem, since the DEFAULT channel does not allow you to find and update to version 5.1-beta2. But, as I wrote above, there are no problems with the TESTING channel.

Obviously, the page describing a specific problem does not correspond to reality.

Perhaps for the stable version 5.1 such a problem will not be relevant, since (again) the channel BY DEFAULT will not provide the development version for updating, but I don’t know how to check now.

However (as far as I remember) earlier updates from development versions came without such a problem.

avatar richard67
richard67 - comment - 20 Mar 2024

@Kostelano What happens if you stay on the Default channel and in the Extension Installer's settings change the "Minimum Stability" from "Stable" to "Beta" (Or Alpha)?

I know, it seems strange that this setting in zhe extensions Installer also is relevant for the core, but that's how it is for historic reasons.

The issue here is that when the PHP or the database version would be the reason, the versions would be added to the information, see my PR #42489 , but that does not include the information about stability when the minimum stability requirement was not met, as that in past has always resulted only in the message that no update was found, which now it seems to result in the "Update found but requirements not fulfilled" message.

avatar Kostelano
Kostelano - comment - 20 Mar 2024

@Kostelano What happens if you stay on the Default channel and in the Extension Installer's settings change the "Minimum Stability" from "Stable" to "Beta" (Or Alpha)?

I checked. In this case, the update is available and you can perform it.

As that in past has always resulted only in the message that no update was found, which now it seems to result in the "Update found but requirements not fulfilled" message.

That's exactly how it is

avatar richard67
richard67 - comment - 20 Mar 2024

I can try to make a PR to fix that in the one or other w<y, but not before weekend. If someone is faster let me know.

avatar richard67
richard67 - comment - 21 Mar 2024

I think the fix would be to remove the following 3 lines of code so it behaves like in past: https://github.com/joomla/joomla-cms/blob/5.1-dev/libraries/src/Updater/ConstraintChecker.php#L224-L226 .

I.e. change

        if (($stabilityInt < $minimumStability)) {
            $this->failedEnvironmentConstraints->stability            = new \stdClass();
            $this->failedEnvironmentConstraints->stability->required  = $stability;
            $this->failedEnvironmentConstraints->stability->used      = $minimumStability;

            return false;
        }

to

        if (($stabilityInt < $minimumStability)) {
            return false;
        }

@SniperSister What do you think?

avatar SniperSister
SniperSister - comment - 21 Mar 2024

@richard67 yes, makes sense!

avatar richard67
richard67 - comment - 21 Mar 2024

Ok, I will make a pull request tomorrow after work or on Saturday.

avatar HLeithner
HLeithner - comment - 21 Mar 2024

that's only one part of the story we discussed this in the tuf team and also the stability is a problem. removing this would fix the message that the server doesn't fit the update but wouldn't allow you to install beta2 over beta1.

avatar wojsmol
wojsmol - comment - 22 Mar 2024

@HLeithner Then IMHO this case should have at at least separate language string explaining the issue.

avatar richard67
richard67 - comment - 22 Mar 2024

that's only one part of the story we discussed this in the tuf team and also the stability is a problem. removing this would fix the message that the server doesn't fit the update but wouldn't allow you to install beta2 over beta1.

@HLeithner That‘s not right. As clarified above, no update will be found when you you have selected minimum stability „Stable“ or „Release Candidate“ with my fix, but when changing to „Alpha“ or „Beta“ the update will be found. So why do you think it will not be possible to update from Beta 1 to Beta 2?

avatar richard67
richard67 - comment - 22 Mar 2024

Anyway, my suggested change seems not to be enough, it seems it needs to change more. Am working on it.

avatar richard67
richard67 - comment - 22 Mar 2024

Hmm, my suggested change works, but there is something which is confusing regarding the minimum stability.

When being on the "Testing" or the "Custom URL" update channel, the Joomla Update component shows a "Minimum Stability" parameter in the options, but only then.

But the parameter which is used for the check in the ConstraintChecker.php is the "Minimum Stability" parameter from the Extension Manager's options, and that may be different. See the code here: https://github.com/joomla/joomla-cms/blob/5.1-dev/libraries/src/Updater/ConstraintChecker.php#L219

I think we have to change the checkStability method of the ConstraintChecker so it gets the minimum stability to be checked as a parameter, and the calling function has to set that parameter right.

In case of the Joomla Update component always the parameter from the options of this component should be used, and that parameter should always be shown, regardless of the update channel, or alternatively when it is hidden, i.e. the update channel is anything else than "Default" or maybe also "Next", then "Stable" has to be used.

@SniperSister @HLeithner what do you think?

avatar richard67
richard67 - comment - 22 Mar 2024

I have a fix ready. PR will come later tonight or tomorrow.

Curious readers may already have a look on 5.1-dev...richard67:5.1-dev-updater-minimum-stability .

avatar Hackwar Hackwar - change - 24 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 24 Mar 2024
avatar Kostelano Kostelano - change - 27 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-27 21:49:04
Closed_By Kostelano
avatar Kostelano Kostelano - close - 27 Mar 2024

Add a Comment

Login with GitHub to post a comment