RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar LadySolveig
LadySolveig
25 Mar 2026

Pull Request resolves # .

  • 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

As it is a valid condition in the XML form for the showon attribute to have something like foo: to display a field only if another field is empty, this should also be possible via the custom fields.

Testing Instructions

1. Add two custom fields in Articles: Fields (text or textarea - doesn't matter)

grafik

2. Add foo: as showon rule into the field in the options tab

grafik

3. Additional tests

  • using various combinations of fields, such as Select, etc
  • OR conditions such as foo:[OR]foo:0 or foo:0[OR]foo:
  • check whether other conditions are working as before
  • test the other way around foo!: - the bar field should now only be displayed if the foo field is not empty

Actual result BEFORE applying this Pull Request

Rejected by validation.

grafik

Expected result AFTER applying this Pull Request

Can be saved and works the same way just like we've been doing all along, by inserting directly into the XML form

grafik

The bar field will now only be displayed if the foo field is empty.

ssitdocker.test_j54_administrator_index.php_option.com_content.view.articles.Laptop.2026-03-25.18.04.09.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

avatar LadySolveig LadySolveig - open - 25 Mar 2026
avatar LadySolveig LadySolveig - change - 25 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2026
Category Libraries
avatar LadySolveig LadySolveig - change - 25 Mar 2026
Title
Fix regex pattern in ShowOnRule for custom fields
[5.4] Fix regex pattern in ShowOnRule for custom fields
avatar LadySolveig LadySolveig - edited - 25 Mar 2026
avatar richard67
richard67 - comment - 25 Mar 2026

3. Additional tests

* using various combinations of fields, such as Select, etc

* `OR` conditions such as `foo:[OR]foo:0` or `foo:0[OR]foo:`

* check whether other conditions are working as before

@LadySolveig Maybe another additional test for a condition !foo: would be useful to see if that is not broken?

I know, it is covered by the last point "check whether other conditions are working as before".

But maybe it should be explicitly mentioned?

avatar LadySolveig LadySolveig - change - 25 Mar 2026
The description was changed
avatar LadySolveig LadySolveig - edited - 25 Mar 2026
avatar LadySolveig LadySolveig - change - 25 Mar 2026
The description was changed
avatar LadySolveig LadySolveig - edited - 25 Mar 2026
avatar exlemor exlemor - test_item - 26 Mar 2026 - Tested successfully
avatar exlemor
exlemor - comment - 26 Mar 2026

I have tested this item ✅ successfully on 6e0e00b

I have tested this successfully... Thanks @LadySolveig! (solving useful things I didn't know we had in Joomla ;) )

I also tested foo:[OR]foo:0 or foo:0[OR]foo: and foo!: which all worked as expected.

@richard67 I assume you meant foo!: and not !foo: (as !foo: did yield the same error message of Invalid field: Showon Attribute) while foo!: saved and behaved in the expected opposite manner of foo:


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47474.
avatar krishnagandhicode krishnagandhicode - test_item - 26 Mar 2026 - Tested successfully
avatar krishnagandhicode
krishnagandhicode - comment - 26 Mar 2026

I have tested this item ✅ successfully on 6e0e00b


Everything works as expected(also verified the edge cases - foo!: and foo:[OR]foo:0, and they saved perfectly).

On a personal note: I recently learned about regular expressions in my Formal Theory of Automata course, so seeing this regex fix in action is really cool.

Thanks @LadySolveig : )


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

avatar LadySolveig
LadySolveig - comment - 26 Mar 2026

Thank you for testing it, @exlemor and @krishnagandhicode! 💚

I really appreciate your personal note. Keep that curiosity and open-mindedness!
The great thing about open source is that throughout our lives, we’ll keep coming across exciting things that we’d previously only heard about in theory.

avatar richard67 richard67 - change - 26 Mar 2026
Status Pending Ready to Commit
Labels Added: bug PR-5.4-dev
avatar richard67
richard67 - comment - 26 Mar 2026

RTC


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

avatar muhme muhme - change - 31 Mar 2026
Labels Added: RTC
avatar muhme
muhme - comment - 31 Mar 2026

✅ Final test before merge with JBT

  • Seen error before,
  • Created text1, text2 and text3
  • Tested text3 showon attributes 'text1:', 'text1!:', text1:[OR]text1:0 and 'text1!:[OR]text2!:'
avatar muhme muhme - close - 31 Mar 2026
avatar muhme muhme - merge - 31 Mar 2026
avatar muhme muhme - change - 31 Mar 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-03-31 17:51:17
Closed_By muhme
avatar muhme
muhme - comment - 31 Mar 2026

Thank you @LadySolveig for your contribution. Thank you @richard67 for support. Thank you @exlemor and @krishnagandhicode for testing.

Add a Comment

Login with GitHub to post a comment