No Code Attached Yet bug
avatar Nobs77
Nobs77
7 Sep 2026

What happened?

1.Steps to reproduce the issue

Create a changelog document containing one whose text has a non-ASCII character — a German umlaut, a French accent, a typographic quote:
<?xml version="1.0" encoding="UTF-8"?> <changelogs> <changelog> <element>plg_system_example</element> <type>plugin</type> <folder>system</folder> <version>1.0.0</version> <fix> <item>Dateien, die außerhalb von Joomla gelöscht wurden, blieben stehen.</item> </fix> </changelog> </changelogs>

  1. Host it and point an extension's at it.

  2. Install that extension at version 1.0.0.

  3. Go to System → Manage → Extensions, click the version number to open the changelog modal.

Version

5.4

Expected result

One list entry:

Dateien, die außerhalb von Joomla gelöscht wurden, blieben stehen.

Actual result

Two list entries, split in the middle of a word:

Dateien, die au
ßerhalb von Joomla gelöscht wurden, blieben stehen.

System Information

Reproduced on Joomla 6.1.2, PHP 8.3. The code is unchanged in 5.4-dev and in every 6.x-dev and 7.0-dev branch, and unchanged since the class was introduced in 4.0.0.

Additional Comments

Cause
libraries/src/Changelog/Changelog.php parses the document with xml_parser_create('') and xml_parse(). Expat may invoke the character-data handler more than once for a single text node — that is documented, expected behaviour, not an edge case. Every other tag in characterData() accounts for it by concatenating:

default:
// Throw the data for this item together
$tag = strtolower($tag);

if (isset($this->currentChangelog->$tag)) {
    $this->currentChangelog->$tag->data .= $data;   // <- concatenates
}
break;

ITEM is the one case that does not:

case 'ITEM':
$this->items[] = $data; // <- each chunk becomes its own list entry
break;
So every chunk boundary inside an item turns into an extra bullet in the modal.

In practice the handler is called once for the ASCII prefix and once for the remainder, so the text breaks immediately before the first multi-byte character — which is why the split lands inside a word rather than at a space.

How widespread this is
Measured on a real, published changelog document of a German extension: 14 of 15 elements were split. Any changelog written in a language that uses accents, umlauts or typographic quotation marks is affected, i.e. most non-English extensions. Pure ASCII text is never affected, which is presumably why this has gone unnoticed.

Suggested fix
Open the item in startElement() and append in characterData(), mirroring what every other tag already does.

startElement():

`// Skip technical elements
if ($name === 'CHANGELOGS' || $name === 'CHANGELOG') {
return;
}

if ($name === 'ITEM') {
$this->items[] = '';

return;

}`

case 'ITEM': if ($this->items !== []) { $this->items[array_key_last($this->items)] .= $data; } break;

One nuance worth deciding: with this change an empty yields an empty string where it previously yielded nothing. If that matters, drop empties when the section closes in endElement().

Workaround for extension developers
Wrap the item text in CDATA — expat then delivers it in one piece:

<item><![CDATA[Dateien, die außerhalb von Joomla gelöscht wurden, blieben stehen.]]></item>

Verified: 15 items, 0 split. Note that inside CDATA the text must not be entity-escaped, or & and " show up literally in the modal.

A note on verifying this
The bug is only visible through Joomla's own parser. SimpleXML and DOMDocument return the text in one piece and report nothing wrong — a test written with either would pass while the modal stays broken. Any regression test for this needs xml_parser_create().

avatar Nobs77 Nobs77 - open - 7 Sep 2026
avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2026
Title
Changelog modal splits an <item> into several list entries when the text is not pure ASCII
Changelog modal splits an into several list entries when the text is not pure ASCII
Labels Added: No Code Attached Yet bug
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Sep 2026

Add a Comment

Login with GitHub to post a comment