? Release Blocker ? Pending

User tests: Successful: Unsuccessful:

avatar HLeithner
HLeithner
8 Aug 2022

Pull Request for Issue introduced in #18032 .

Summary of Changes

  • Don't add a default_value attribute if value is NULL. This crashes GroupedlistField and maybe other fields.
  • Hide default value field custom fields for the menuitem

Testing Instructions

Test custom fields, especially menuitem

Actual result BEFORE applying this Pull Request

see #38244 (comment)

Expected result AFTER applying this Pull Request

works

avatar HLeithner HLeithner - open - 8 Aug 2022
avatar HLeithner HLeithner - change - 8 Aug 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2022
Category Administration com_fields Front End Plugins
avatar obuisard
obuisard - comment - 8 Aug 2022

I have tested this item successfully on 51ea6ce

Works as expected with the menuitem field.


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

avatar obuisard obuisard - test_item - 8 Aug 2022 - Tested successfully
avatar jwaisner
jwaisner - comment - 8 Aug 2022

I have tested this item successfully on 51ea6ce

Works with menuitem and other custom fields.


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

avatar jwaisner jwaisner - change - 8 Aug 2022
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 8 Aug 2022

RTC


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

avatar jwaisner jwaisner - test_item - 8 Aug 2022 - Tested successfully
avatar Quy Quy - change - 8 Aug 2022
Labels Added: ? ?
avatar laoneo
laoneo - comment - 9 Aug 2022

Looks good to me, just wondering why this custom field can't have a default value.

avatar roland-d roland-d - change - 9 Aug 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-08-09 07:19:23
Closed_By roland-d
Labels Added: Release Blocker
avatar roland-d roland-d - close - 9 Aug 2022
avatar roland-d roland-d - merge - 9 Aug 2022
avatar roland-d
roland-d - comment - 9 Aug 2022

Thank you

avatar HLeithner
HLeithner - comment - 9 Aug 2022

Looks good to me, just wondering why this custom field can't have a default value.

I was wondering too, I only had a quick look while fixing it. It happens here:
https://github.com/joomla/joomla-cms/blob/4.2-dev/libraries/src/Form/Field/GroupedlistField.php#L134
but to me that doesn't make any sense on the first glance because I would expect that the default_value is an attribute and not an element.

But since I found the issue in the default_value === '' check I fixed this one since maybe other fields have this problem too.

If someone wants to have a look at GroupedlistField he or she is welcome to do it.

Add a Comment

Login with GitHub to post a comment