Feature PR-6.2-dev Pending

User tests: Successful: Unsuccessful:

avatar MarkRS-UK
MarkRS-UK
24 Jun 2026
  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Change changelog code to show all changelog entries for an extension in the admin panel.

Testing Instructions

Ensure an extension that supplies more than one changelog entry is installed.
Select the extension in the System->Manage->Extensions list of the admin panel.
Click on the version number of the selected extension

Actual result BEFORE applying this Pull Request

A dialogue box appears with the changelog entry for the currently installed version.

Expected result AFTER applying this Pull Request

A dialogue box appears with ALL changelog entries.

Other comments

I wanted to make the list scroll to the currently installed version and have supplied each entry with an id for that purpose, but I don't know how to run the required javascript when the dialogue box opens.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar MarkRS-UK MarkRS-UK - open - 24 Jun 2026
avatar MarkRS-UK MarkRS-UK - change - 24 Jun 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jun 2026
Category Administration com_installer Layout Libraries
avatar tecpromotion
tecpromotion - comment - 24 Jun 2026

@MarkRS-UK please have a look at the code style errors and fix them.

avatar tecpromotion tecpromotion - change - 24 Jun 2026
Title
Changelog shows all changes not just latest
[6.2] Changelog shows all changes not just latest
avatar tecpromotion tecpromotion - edited - 24 Jun 2026
avatar tecpromotion tecpromotion - change - 24 Jun 2026
The description was changed
avatar tecpromotion tecpromotion - edited - 24 Jun 2026
avatar tecpromotion tecpromotion - change - 24 Jun 2026
The description was changed
avatar tecpromotion tecpromotion - edited - 24 Jun 2026
avatar MacJoom
MacJoom - comment - 24 Jun 2026

Thank you for your contribution. Could you please check your development/Git setup? It’s currently almost impossible to review this PR because entire files appear to have been replaced, probably due to tab or CRLF issues.

avatar MarkRS-UK MarkRS-UK - change - 24 Jun 2026
Labels Added: Updates Requested PR-6.2-dev
avatar tecpromotion tecpromotion - test_item - 24 Jun 2026 - Tested unsuccessfully
avatar tecpromotion
tecpromotion - comment - 24 Jun 2026

I have tested this item πŸ”΄ unsuccessfully on 6be3675


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

avatar tecpromotion
tecpromotion - comment - 24 Jun 2026

I have tested this item πŸ”΄ unsuccessfully on 6be3675


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

avatar tecpromotion
tecpromotion - comment - 24 Jun 2026

I have tested this item πŸ”΄ unsuccessfully on 6be3675


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

Verdict: Needs one small change β€” the feature works, but it introduces a PHP warning on a
realistic failure path.

The pr does what it claims: the extension changelog modal (System β†’ Manage β†’ Extensions β†’
click the version) now lists all changelog versions instead of only the installed one, each
under its own version header. Confirmed working. There is one regression to fix before merge, plus a
couple of optional notes.

Verification

Tested on a clean 6.2-dev build of this PR (DDEV, PHP 8.3). Seeded an extension (com_banners) with
a changelog XML containing three versions (3.0.0 / 2.0.0 / 1.0.0, mixed change types) and exercised
the real code path (Changelog::loadFromXml β†’ ManageModel::loadChangelog β†’ FileLayout joomla.installer.changelog).

  • After (this PR): all three versions render, each with its <div id="<version>" class="changelog"> header and the correct per-type badges (security/fix/addition/change/remove/
    note) and items.
  • Before (base 6.2-dev, per the diff): only the entry whose version matched the installed
    version was kept ($latest), so a single version was shown. The behaviour change is real and
    correct.
  • Scope is sensible (4 files, +81/βˆ’90); the now-unused deprecated Changelog::get() calls are
    removed from ManageModel and the matching phpstan-baseline.neon entries are correctly dropped.

Finding (needs change) β€” PHP warning when the changelog is empty or the URL fails

Changelog::$changes is declared public $changes; with no default, and
ManageModel::loadChangelog() iterates it unconditionally:

foreach ($changelog->changes as $key => $entry) {   // ManageModel.php

If loadFromXml() returns no <changelog> entries (empty <changelogs>) or fails entirely
(URL 404 / changelog server unreachable)
, $changes stays null, so this becomes
foreach (null …):

Warning: foreach() argument must be of type array|object, null given

I reproduced both cases at runtime (empty <changelogs/> β†’ loadFromXml=true, changes=NULL; bad
URL 404 β†’ loadFromXml=false, changes=NULL); both fire the warning (confirmed via CLI with full
error reporting). The old code degraded silently here (it guarded on isset($this->latest) /
get() returned null). A down/missing changelog server is a plausible real-world condition.

Real-world visibility: in the running backend the warning does not surface in the modal β€”
I tested the actual manage.loadChangelogRaw endpoint with Error Reporting at both default and
maximum, and in both cases the modal is simply empty (0 bytes); Joomla's runtime error handler
keeps the E_WARNING out of the output (it goes to the log). So the user-facing symptom is a silent
empty modal rather than a graceful no-op, and the unguarded foreach over a nullable property is a
code-level regression worth fixing regardless.

Suggested fix

Initialise the property to an array β€” one line, fixes both cases:

// libraries/src/Changelog/Changelog.php
public $changes = [];

(Optionally also guard in the model: if (empty($changelog->changes)) { return ''; }.)

Optional notes

  • Dead code: with the version-match logic gone, setVersion() / $matchVersion (and
    getVersion()) no longer affect anything β€” ManageModel still calls setVersion() but it is now
    a no-op. Consider removing, or leave for b/c.
  • Output escaping: the version key is echoed unescaped into both an attribute and text
    (id="<?php echo $key?>", <span><?php echo $key; ?></span>). It comes from the extension's own
    changelog XML (low risk), but $this->escape() would be more consistent with the project's
    output-escaping stance.
  • The author's note (scroll/highlight the installed version via the added id) is not implemented;
    fine for this PR's scope.
avatar MarkRS-UK
MarkRS-UK - comment - 24 Jun 2026

Thanks for that. I've implemented all of those. Tested with a valid changelog and with a broken changelog URL which simply yields a blank dialog.

avatar tecpromotion tecpromotion - test_item - 25 Jun 2026 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 25 Jun 2026

I have tested this item βœ… successfully on 6de5081


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

avatar tecpromotion
tecpromotion - comment - 25 Jun 2026

I have tested this item βœ… successfully on 6de5081


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

avatar alikon
alikon - comment - 25 Jun 2026

may i suggest to add something like

   /**
     * Update manifest `<releasedate>` element
     *
     * @var    string
     * @since  __DEPLOY_VERSION__
     */
    protected $releasedate;

to have something like

image
<changelogs>
    <changelog>
        <element>mod_changelog</element>
        <type>module</type>
        <version>1.0.0</version>
        <releasedate>2024-01-01</releasedate>
        <security>
            <item>Item A</item>
            <item>Item b</item>
        </security>
        <fix>
            <item>Item A</item>
            <item>Item b</item>
        </fix>
        <language>
            <item>Item A</item>
            <item>Item b</item>
        </language>
        <addition>
            <item>Item A</item>
            <item>Item b</item>
        </addition>
        <change>
            <item>Item A</item>
            <item>Item b</item>
        </change>
        <remove>
            <item>Item A</item>
            <item>Item b</item>
        </remove>
        <note>
            <item>Item A</item>
            <item>Item b</item>
        </note>
    </changelog>
    <changelog>
        <element>mod_changelog</element>
        <type>module</type>
        <version>1.1.0</version>
        <releasedate>2026-01-01</releasedate>
        <change>
            <item>Code clean</item>
        </change>
    </changelog>
</changelogs>
avatar MarkRS-UK
MarkRS-UK - comment - 25 Jun 2026

Seems like a good idea, but is "releasedate" a valid tag? It's not listed in the documentation.

From that point of view, I'd say this would be out of scope for this PR.

avatar alikon
alikon - comment - 26 Jun 2026

It's not listed in the documentation.

not yet but, all changelogs have that information especially when you are showing all items like in this pr

avatar MarkRS-UK
MarkRS-UK - comment - 26 Jun 2026

What is that date then?

Looks to me like it's the creation date, adding "01" if a day isn't specified. Is that meant to signify version release date? That's not what I would have guessed.

avatar alikon
alikon - comment - 26 Jun 2026

version release date

avatar TLWebdesign
TLWebdesign - comment - 21 Jul 2026

@MarkRS-UK Are you able to finish this PR so we could maybe get it in? Today Alpha 3 will be released. This feature would need to be ready before Beta 1 in three weeks (ready, tested and RTC) else we'll miss the deadline for 6.2.

avatar MarkRS-UK
MarkRS-UK - comment - 21 Jul 2026

What would constitute "finished". I thought it was finished. The extra suggestion about "releasedate"?

avatar MarkRS-UK
MarkRS-UK - comment - 21 Jul 2026

What would constitute "finished"? I thought it was finished. The extra suggestion about "releasedate"?

avatar TLWebdesign
TLWebdesign - comment - 21 Jul 2026

ahh ok yeah well it's finished if there is nothing more to add to the code i guess πŸ˜… So we need testers then. I do like the option of the release date tho. I get why you say it's out of scope so maybe another PR. lets get this one in first.

avatar MarkRS-UK MarkRS-UK - change - 21 Jul 2026
Labels Removed: Updates Requested
avatar MarkRS-UK
MarkRS-UK - comment - 19 Aug 2026

Bit disappointed not to see this in 6.1.3. Is something else required from me or was it just a lack of testers?

avatar QuyTon QuyTon - change - 20 Aug 2026
Labels Added: Feature
avatar brianteeman
brianteeman - comment - 20 Aug 2026

Bit disappointed not to see this in 6.1.3. Is something else required from me or was it just a lack of testers?

Well it's a new feature so you correctly made it for 6.2 - but yes it needs testers

avatar brianteeman
brianteeman - comment - 21 Aug 2026

Tested with Latest News Enhanced from @obuisard

  • as you can see the contents of the changelog are very different

Before

image

After

image
avatar brianteeman
brianteeman - comment - 21 Aug 2026

Tested with Latest News Enhanced from @obuisard

  • as you can see the contents of the changelog are very different

this is the changelog xml https://updates.simplifyyourweb.com/free/latestnewsenhanced/changelog.xml

Before

image

After

image
avatar brianteeman brianteeman - test_item - 21 Aug 2026 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 21 Aug 2026

I have tested this item πŸ”΄ unsuccessfully on 556cdeb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

avatar brianteeman
brianteeman - comment - 21 Aug 2026

I have tested this item πŸ”΄ unsuccessfully on 556cdeb


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

avatar MarkRS-UK
MarkRS-UK - comment - 21 Aug 2026

Wow, that;s awful! Thank you. I'll fix it.

avatar MarkRS-UK
MarkRS-UK - comment - 21 Aug 2026

Wow, that's awful! Thank you. I'll fix it.

avatar MarkRS-UK
MarkRS-UK - comment - 22 Aug 2026

Fixed. Tested with Latest News Enhanced and two others.
The only file changed is Changelog.php in the library. I didn't know how to exclude the others, which seem to be the 6.2-dev updates.
The Ci typos & PHPstan failures are not in my code.

avatar brianteeman
brianteeman - comment - 22 Aug 2026

the problem with ci and typos is that you have accidentally commited the files from latest news enhanced. please remove them and it should all be ok again

avatar brianteeman
brianteeman - comment - 22 Aug 2026

you still need to remove the extra files in the library and plugin folders!

avatar MarkRS-UK
MarkRS-UK - comment - 22 Aug 2026

Yes, removing the Latest News Package left a couple of files around. Now removed, should I wait for this set of tests to finish before updating?

avatar brianteeman
brianteeman - comment - 22 Aug 2026

no need to wait - a new commit will cancel the existing tests and start new ones

avatar brianteeman
brianteeman - comment - 22 Aug 2026

@MarkRS-UK you still need to remove ALL the files from latest news

avatar MarkRS-UK
MarkRS-UK - comment - 22 Aug 2026

Working on it

avatar brianteeman brianteeman - test_item - 23 Aug 2026 - Tested successfully
avatar brianteeman
brianteeman - comment - 23 Aug 2026

I have tested this item βœ… successfully on 1260697


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

avatar brianteeman
brianteeman - comment - 23 Aug 2026

I have tested this item βœ… successfully on 1260697


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48015.

Add a Comment

Login with GitHub to post a comment