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

[5.1] Can't be updated to Joomla ‎5.1.0-beta2 #43100

Closed
Kostelano opened this issue Mar 20, 2024 · 15 comments
Closed

[5.1] Can't be updated to Joomla ‎5.1.0-beta2 #43100

Kostelano opened this issue Mar 20, 2024 · 15 comments

Comments

@Kostelano
Copy link
Contributor

Kostelano commented Mar 20, 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

@Kostelano
Copy link
Contributor Author

Kostelano commented Mar 20, 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.

@richard67
Copy link
Member

@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?

@Kostelano
Copy link
Contributor Author

Kostelano commented Mar 20, 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.

@richard67
Copy link
Member

@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.

@Kostelano
Copy link
Contributor Author

@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

@richard67
Copy link
Member

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.

@richard67
Copy link
Member

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?

@SniperSister
Copy link
Contributor

@richard67 yes, makes sense!

@richard67
Copy link
Member

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

@richard67 richard67 self-assigned this Mar 21, 2024
@HLeithner
Copy link
Member

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.

@wojsmol
Copy link
Contributor

wojsmol commented Mar 22, 2024

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

@richard67
Copy link
Member

richard67 commented Mar 22, 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?

@richard67
Copy link
Member

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

@richard67
Copy link
Member

richard67 commented Mar 22, 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?

@richard67
Copy link
Member

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants