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
Update servers check algorithm doesn't match docs. Seems broken. #25766
Comments
@alex7r please add the version tag to the collection xml as this is an required field as explained in the docs. (https://docs.joomla.org/Deploying_an_Update_Server#Collection) |
@zero-24 It do not help solving the issue, please note:
|
Ok so you are requesting a new feature for the
I'm sorry i can't follow you here, can you please be more specific what is supposed to work how? |
Quote from docs:
So no, there is no "feature request". I just want current functionality to be properly defined and tied instead of lose ends. (As I stated above: there are almost done possibilities (one described in docs, the other is buried in code)). Please see lines (I'll provide them as a backtrace order):
However there is a multiple bugs in:
|
Well please let me explain the current working behavior and than lets talk about the ref attribute you found. the current working behavior of collection.xmlThe collection.xml files are intended todo the following (see the docs)
For that reason the following attributes are required to make this feature work (also from the docs):
How the feature (collection URL + details URL) work is the following:
Your questions
I was not aware of that feature at all, as the "REF" thing does not seam to be documented at all.
detailsurl != ref in this case. The details URL allows extension xml files and is working good in that matter. For ref I don't know what the original intent was as it is not documented.
Another thing that is not in the docs agree.
I can asure you that The ref attributehmm it seams that this joomla-cms/libraries/joomla/updater/adapters/collection.php Lines 54 to 55 in 6a3da60
Maybe @mbabker @wilsonge @infograf768 remember what this REF should have been used for, i have not got the idea of that tag yet? By the inline comments there it seams it was already expected to only get collection Update URLs and for that reason it was hardcoded to that. Next StepsFor the next steps I would like request you to provide the following:
Please keep out the current behavior of the ref attribute or extra sites etc. Please explain what you want to happen, why you need that behavior and what issue that would fix. So we can take a look into a way fixing that issues that does not seam to be adressed by the current system yet. Thanks :) |
As with everything else in Joomla as it pertains to the code, your best bet is to reverse engineer the API to figure out the expected behaviors and not rely on documentation (as the documentation is either not written, written for a non-technical perspective, or partially written by someone who has only documented things they understand without having reverse engineered the code). This is why I have said in the past there should be feature specifications for the behaviors in core that can form the foundation of proper documentation. I have nothing else to offer here. |
As I've recently came across article describing Joomla community problems and issues of communication may be interpreted as rude or offensive would like to put a disclaimer here just in case:
@zero-24 Feel like I need to ask to verify if something wrong on my side, or...
was done before coming here, and everything described above is the results of this investigation (and not relying on docs, but highlighting where they do not match). @zero-24 So let's start from the beginning with description of the problem: Additional comments:
So as the result:
|
Yes it absolutely works as intended and documented. I have just tested it with one of my own plugin that is using collection update server and you can test it yourself by updating the Joomla core that is using the same system.
Yes.
Correct..
Well to be sure when you use collection.xml the detailsurl is only called in case there is an update and you choose to install it, that is part of the reason that the version and other infos are required in the collection.xml itself. This is the codepath that call this URL: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_installer/models/update.php#L347 This mention code path is called when you hit "install this update" for this extension. This code path also includes handling of the minimum stability tag.
I don't agree on this one as they work exactly as described in the docs but i agree that collection does not support minimum stability yet.
I agree :)
Yes they don't work because they are not intended to be used in this way so they don't work that way :D ConclusionsSo basically we are back to this
I agree on this when using collection.xml Joomla does not support minimum stability yet in an consistent way. The current problems
Possible solutionsPossible fix for the first and third problemA possible solution would be to combine in that case (collection.xml) both adapters and also follow the detailsurl including checking for all other attributes. The code would than do something like this:
At the time we install the update we should also check whether we would actually install a different version than mention in the collection.xml and block that. This should only happen in case someone does not correctly setup the collection and extension xml yet or between the inital check and the download limiting options have been changed like minimum stability or php version etc.. Possible fix for the second problemThis would be the But is collection that the best way to use? Lets look back where the collection update server is intended to be used for:
Based on this we have two implemented use cases for the collection update server.
And here starts the problem as the use case here is something completely different.
As this is something completely different than the current collection.xml features I would suggest to not use them for this kind of problem as this would only make the collection adapter more complicated. But we might can implement a new adapter that can handle that.
For that reason I would like to understand why you don't use the extension.xml and what is the usecase of using collection and extension.xml together in your case? As in the end without version and the other meta infos in the collection the collection would be just a link list that provides different detailurls based on mimimum stability or php version and just says something like "You are using 3.x and your minimum stability is RC look at this details URL", "You are using 3.x and your minimum stability is Stable look at this details URL" But I don't got yet what would be the benifit of such thing over the extension xml that does that today already and needs to be created anyway? Yes it would make that thing a bit more abstract and as you can use different xml files the individual xml files could be a bit shorter and more focused, but I'm not sure whether file size is a problem at all in this case. Other things
Thanks @mbabker for your input, i fully agree on your assessment :) My question came from the hope you might know what this Maybe @Hackwar knows what this Do we have the commit history from before |
It's all there, minus the release tags since nobody thought about mapping SVN tags to git tags. Start from https://github.com/joomla/joomla-cms/tree/1.7.3 and traverse backwards, then hope either the commit messages or any changelog entries semi-reflect the change that actually happened. |
Ok that it what I have found too so we only have the inital commit here: 6a3da60#diff-bdfc86903b98d8e68b328ed19f8ce0f0R53 That already include that ref thing. hmm can we get any more details from: |
That's the SVN commit number the git commit was created from, you aren't going to find anything more useful there. And unless you find a JoomlaCode issue number in all of that, you're not going to find anything on the tracker archive (and it looks like there is no other reference than that commit, so you're kind of out of luck for following links). |
Maybe a search based on the date and the author ? |
I had no luck with that too. :(
Ok thanks for confirming :) |
Closed as having Pull Request #25928 |
So the first and third issue can be fixed by #25928 the actual feature to use a collection like update server without version has not implemented yet. Re-opening for that reason. |
@zero-24 your call on this one |
Well my proposal and comments was not followed up. So I will close this issue here. Feel free to create a new one once feedback is aviable. If anything it would be a new feature to be implemented into J4.x |
Steps to reproduce the issue
Try to use "collection" type of update and direct updater it to detailed xml with "extension" structure type.
See docs here: https://docs.joomla.org/Deploying_an_Update_Server
Expected result
I use Collection XML to direct update checker to Extension XML to make sure it respects "minimum_stability" level.
Actual result
It doesn't match docs. Doesn't request second level at all.
There is a way to make the request, but it will not respect XML type and will check by Collection adapter, which doesn't work with Extension XML nor respects stability level.
Additional comments
Collection (according to docs) xml:
Extension xml:
Looking to the code I've tried to came up with this Collection XML:
It does set one more update server check, however it checks it under "collection" type (hardcoded). And I need to use "extension" type to make sure it respects "stability_minimum".
The text was updated successfully, but these errors were encountered: