Updates Requested 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

Add a Comment

Login with GitHub to post a comment