User tests: Successful: Unsuccessful:
Pull Request for Issue #43505.
The transport options write the body to the stream interface, by doing so the pointer gets placed at the end of the stream. Any code that uses the Response
class to get the body will get an empty string instead of the read data. So we need to rewind the cursor before returning the response.
In addition the Changelog class should not access the body directly but use the getBody()->getContents()
function.
jos_
with your prefix and DOMAIN
with your domainUPDATE jos_extensions SET changelogurl = 'https://DOMAIN/changelog.xml' WHERE
element= 'com_actionlogs' and
type = 'component';
System
-> Manage
-> Extensions
action
and type component
3.9.0
that will show the modal with the changelogSystem
-> Update
-> Extensions
Check for Updates
jos_updates
table (replace jos_
with your own prefix) for the entry that is about the outdated extensionversion
field with 3.9.0
changelogurl
field with the URL where you placed the changelog XML fileelement
field with com_actionlogs
Changelog
button next to the extension you modified and the available version will show 3.9.0
because that is what we changedA modal is shown with only the title
The modal is shown with the changelog entries
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
@robbiejackson I will check that scenario as well. Since I saw the issue happening with the installed extension I forgot about the update server.
Labels |
Added:
PR-5.2-dev
|
Category | Libraries | ⇒ | Administration com_installer Libraries |
@robbiejackson I see now what you are trying to say in your issue. We should load the changelogurl based on the view we are in. This PR has now been updated to use the updates table when in the update view but with a fallback to the extension table changelog URL. This ensures backwards compatibility.
I personally think that in the updates view there shouldn't be any fallback to the extensions table. From the user perspective if he/she sees a changelog against an updated version of an extension, then the changelog only for that version should be shown, and just an error message if the software encounters a problem. It shouldn't revert to showing the changelog for the previous version at all (which is what you'd get if you used the link in the extensions table). That doesn't make sense to me.
In that case it becomes a question if it is a B/C break, which I guess it is. I can have the changelog for the current and new versions in 1 file.
I do not think you will see the changelog for the previous version because the code checks the changelog for the version number. This must match the version of the update.
Remember that this is a bug fix, not a feature enhancement. Bug fixes are not supposed to be backwardly compatible!
I've tested this and it's displaying the update changelog ok.
If it can't load the changelog then it would be nice if it displayed an error message to the user (rather than it just being blank), but at least it reports the error in the log file.
I still think it would be better to simplify the code so that you never used the extension changelog in the update scenario, ie line 431 just have
if ($source === 'update' && !$extension->updateChangelogurl) {
return '';
}
and then in line 437:
$changelog->loadFromXml($source === 'manage' ? $extension->changelogurl : $extension->updateChangelogurl);
However, users only get to this code via the blue Changelog button on the Updates form, and in that case the $extension->updateChangelogurl
should always be set, so I'm not going to make an issue of this.
I don't know where the blue "Test" button is to register a test, but if you let me know then I'll do that.
I don't feel qualified to test the other aspects of this PR though.
Finally, many thanks for fixing this problem!
Title |
|
Title |
|
I'm afraid this PR doesn't address issue #43505 which is concerned with the changelog associated with the update server xml file, not the changelog associated with the installed extension xml file.
So #43505 is about the changelog in the Extensions: Update list, not the changelog in the Extensions: Manage list. Please see the Additional Comments in #43505 for more explanation.