No Code Attached Yet bug
avatar AndySDH
AndySDH
18 Sep 2023

Steps to reproduce the issue

  • Go to Content -> Fields
  • Edit an existing field or create a new one
  • Go to Options tab
  • Edit the "Showon Attribute" field.
  • Try to set it so that the field depends on another field being NOT EMPTY (without needing a specific value).

To show a field when another field (e.g. foo) has been selected (when that other field is not empty), use showon="foo!:" (without a value specified).

This is described in the documentation here:
https://docs.joomla.org/Form_field#Common_attributes
and here:
https://help.joomla.org/proxy?keyref=Help50:Fields:_Edit&lang=en#Options

Expected result

I should be able to save the field options.

Actual result

Upon saving, I get this error:

"Invalid field: Showon Attribute"

It seems like the form is expecting something after the colon, eg "foo!:2" (for saying when it's NOT 2), but as documented, the syntax for NOT EMPTY is simply "foo!:" and should work.

Now it no longer works.

System information (as much as possible)

‎5.0.0-beta1

Additional comments

This works correctly in the current and latest version Joomla 4.

It broke in Joomla 5.

avatar AndySDH AndySDH - open - 18 Sep 2023
avatar joomla-cms-bot joomla-cms-bot - change - 18 Sep 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Sep 2023
avatar AndySDH AndySDH - change - 18 Sep 2023
Title
[5.0] Showon Attribute doesn't accept correct syntax on Joomla 5
[5.0] [com_fields] Showon Attribute doesn't accept correct syntax on Joomla 5
avatar AndySDH AndySDH - edited - 18 Sep 2023
avatar AndySDH AndySDH - change - 18 Sep 2023
The description was changed
avatar AndySDH AndySDH - edited - 18 Sep 2023
avatar AndySDH AndySDH - change - 18 Sep 2023
The description was changed
avatar AndySDH AndySDH - edited - 18 Sep 2023
avatar richard67
richard67 - comment - 18 Sep 2023

Could be caused by #41460 . @MagnusSinger Could you check. Thanks in advance.

avatar AndySDH AndySDH - change - 18 Sep 2023
The description was changed
avatar AndySDH AndySDH - edited - 18 Sep 2023
avatar AndySDH
AndySDH - comment - 18 Sep 2023

Yes it is definitely related

avatar wilsonge wilsonge - change - 20 Sep 2023
Labels Added: Release Blocker
avatar wilsonge wilsonge - labeled - 20 Sep 2023
avatar MagnusSinger
MagnusSinger - comment - 21 Sep 2023

Sure I'll check it ASAP

avatar richard67 richard67 - change - 24 Sep 2023
Labels Added: bug
avatar richard67 richard67 - labeled - 24 Sep 2023
avatar richard67
richard67 - comment - 25 Sep 2023

There are other problems with that rule, too, see my comment here: #41460 (comment) .

avatar richard67
richard67 - comment - 25 Sep 2023

Am working on a fix, see #41918 . But I have to test it myself first. So it's still draft. When it is ready we can close this issue.

avatar richard67 richard67 - change - 25 Sep 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-09-25 15:01:10
Closed_By richard67
avatar richard67 richard67 - close - 25 Sep 2023
avatar richard67
richard67 - comment - 25 Sep 2023

Closing as having a pull request. Please test #41918 . Thanks in advance.

avatar richard67 richard67 - change - 25 Sep 2023
Labels Removed: Release Blocker
avatar richard67 richard67 - unlabeled - 25 Sep 2023

Add a Comment

Login with GitHub to post a comment