Skip to content

[5.4] warn when duplicate subform fields are removed on save#47511

Merged
muhme merged 4 commits intojoomla:5.4-devfrom
krishnagandhicode:33327-subform-duplicate-warning
Apr 2, 2026
Merged

[5.4] warn when duplicate subform fields are removed on save#47511
muhme merged 4 commits intojoomla:5.4-devfrom
krishnagandhicode:33327-subform-duplicate-warning

Conversation

@krishnagandhicode
Copy link
Copy Markdown
Contributor

Pull Request resolves #33327

  • 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

This fixes the silent duplicate filed removal behavior for Subform fields

this fix now : on saving a Subform field, check for duplicate selected custom fields in the options list, if found any the duplicates are removed during during save (existing behavior), but now a warning message is shown to the user so the change is not silent and the user is aware of it.

Testing Instructions

Navigate to : Administrator > fields
create a field only give it a title and save and close
now create a new field or type subform (i.e select Subform (subform) in type field) > now go to Fields (at end in General tab) select the same custom field more than once > Save & close
(see the video in Before and after Patch section in this disc. if unclear)

Actual result BEFORE applying this Pull Request

Duplicate subform fields will be removed on save without any warning,
so after save when you check your subform field each custom field appears only once. (but the user is unaware why)

Before.mp4

Expected result AFTER applying this Pull Request

Duplicate subform fields are still cleaned up on save, but users now receive a warning message saying that duplictes were removed and that each field can only be used once

After.mp4

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

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-5.4-dev labels Mar 30, 2026
@exlemor
Copy link
Copy Markdown

exlemor commented Mar 31, 2026

I have tested this item ✅ successfully on 6055428

I have tested this successfully - thanks @krishnagandhicode


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

@SRV-KILLER09
Copy link
Copy Markdown

I have tested this item ✅ successfully on 6055428


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

@richard67
Copy link
Copy Markdown
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 1, 2026
@richard67 richard67 added the bug label Apr 1, 2026
@muhme
Copy link
Copy Markdown
Contributor

muhme commented Apr 2, 2026

✅ Final test before merge with JBT

  • Seen silent deletion of duplicate fields in subform field
  • Applied PR with Patch Tester
    • Seen yellow warning 'Duplicate subform fields were removed. Each field can only be used once.'
    • Only one warning is displayed if two of the three duplicate fields are removed
    • No warning if two different fields are used in one subform field and the fields are still exist
    • No warning if two subform fields are using the same field

@muhme muhme merged commit 1a2f77e into joomla:5.4-dev Apr 2, 2026
70 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 2, 2026
@muhme
Copy link
Copy Markdown
Contributor

muhme commented Apr 2, 2026

Thank you very much @krishnagandhicode for your contribution. Thanks to @brianteeman for your support. Thanks to @SRV-KILLER09 and @exlemor for testing.

@muhme muhme added this to the Joomla! 5.4.5 milestone Apr 2, 2026
@krishnagandhicode krishnagandhicode deleted the 33327-subform-duplicate-warning branch April 2, 2026 06:41
@krishnagandhicode
Copy link
Copy Markdown
Contributor Author

Thanks for the merge, and thanks to everyone who helped test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[4.0] subform multiple

7 participants