RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar ramalama
ramalama
24 Mar 2026

Pull Request resolves #47451.

  • 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

Fixes wrong implementation of element removal in Form->load with overwrite=false.

Testing Instructions

  1. Install mod_demo47451_1.0.0.zip (System → Install → Extensions).
  2. Publish the new module “Demo for issue #47451 …” in any template position
    (e.g. Cassiopeia main-top), assigned to all pages.
  3. Open the site frontend.

Actual result BEFORE applying this Pull Request

Red FAIL box:

FAIL — bug #47451 present: title appears 2× in the form XML (expected 1×) and
the rendered form shows the label “Label from BASE xml (must NOT win)” — the
merge overrode the existing field in the wrong direction.

The dumped form XML contains a second <fieldset name="demo"> with a duplicate
<field name="title">.

Expected result AFTER applying this Pull Request

Green PASS box:

PASS — the existing field was kept (title appears 1× in the form XML, label:
“Label from VARIANT xml (must win)”).

The rendered fieldset shows title once with the VARIANT label, and the new
extra field from the base XML is still added correctly.

What the module does

  1. Builds a Form from a variant XML that defines the field title
    (label “Label from VARIANT xml (must win)”).
  2. Merges a base XML via $form->load($baseXml, false) that also defines
    title (label “Label from BASE xml (must NOT win)”) plus a new field extra.
    This mirrors what e.g. com_content's CategoryModel::preprocessForm() does
    after a variant form file was loaded.
  3. Checks the result and prints a green PASS or red FAIL box, the rendered
    fieldset and the resulting form XML.

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 ramalama ramalama - open - 24 Mar 2026
avatar ramalama ramalama - change - 24 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Mar 2026
Category Libraries
avatar ramalama
ramalama - comment - 24 Mar 2026

new PR instead of #47452

avatar richard67 richard67 - change - 24 Mar 2026
Title
Fix unset operation on field variable
[5.4] Fix unset operation on field variable
avatar richard67 richard67 - edited - 24 Mar 2026
avatar ramalama
ramalama - comment - 29 Jul 2026

mod_demo47451_1.0.0.zip
I created a minimal module extension to be used for testing.
I will also update testing instruction above accordingly.

avatar ramalama ramalama - change - 29 Jul 2026
The description was changed
avatar ramalama ramalama - edited - 29 Jul 2026
avatar rbuelund rbuelund - test_item - 22 Aug 2026 - Tested successfully
avatar rbuelund
rbuelund - comment - 22 Aug 2026

I have tested this item ✅ successfully on bc9a641


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

avatar rbuelund
rbuelund - comment - 22 Aug 2026

I have tested this item ✅ successfully on bc9a641


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

avatar muhme muhme - test_item - 28 Aug 2026 - Tested successfully
avatar muhme
muhme - comment - 28 Aug 2026

I have tested this item ✅ successfully on bc9a641

Tested with the given module, red before and green afterwards. No unusual Joomla or PHP log messages.


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

avatar muhme
muhme - comment - 28 Aug 2026

I have tested this item ✅ successfully on bc9a641

Tested with the given module, red before and green afterwards. No unusual Joomla or PHP log messages.


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

avatar richard67 richard67 - change - 28 Aug 2026
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 28 Aug 2026

RTC


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

avatar richard67
richard67 - comment - 28 Aug 2026

RTC


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

avatar muhme muhme - change - 29 Aug 2026
Labels Added: RTC bug PR-5.4-dev
avatar muhme
muhme - comment - 29 Aug 2026

The proposal was discussed by maintainers, whether there should be a clear, consistent code (but it can be merged as how it is) or whether the proposal is too resouce-expensive simply to remove a single item, given that a web server has limited resources. The RMs have decided to merge the PR as is. Thank you all.

avatar muhme muhme - change - 29 Aug 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-08-29 08:29:08
Closed_By muhme
avatar muhme muhme - close - 29 Aug 2026
avatar muhme muhme - merge - 29 Aug 2026
avatar muhme
muhme - comment - 29 Aug 2026

Thank you very much @ramalama for your contribution. Thanks to @joomdonation and @HLeithner for review. Thank you @rbuelund for testing.

Add a Comment

Login with GitHub to post a comment