User tests: Successful: Unsuccessful:
Subform Field doesn't allow to set a value
because the supplied value
is automatically converted to string
which is the wrong variable type for Subform Field. The Field needs an array
.
This PR automatically converts a json
encoded string into an array
and allows to supply an array
directly
Testing the new functionally is not so easy.
Editing the com_content default layout could be the simplest way.
You need to get the subform field from the form and set a value.
For a successful test I would expect that the simple test is enough.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
we have that here also:
joomla-cms/libraries/src/Form/Field/SubformField.php
Lines 216 to 220 in ff20420
maybe also change there to avoid duplication?
Not sure what you mean, isn't this the same code?
Maybe the cast to array should be removed by me and the use statement....
hm, ignore, my comment, sorry for confusing
Maybe the cast to array should be removed
yea, I think better to remove, or at least check if there any value,
because $this->value = (array) null;
will produce [null]
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-04 00:44:33 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks!
we have that here also:
joomla-cms/libraries/src/Form/Field/SubformField.php
Lines 216 to 220 in ff20420
maybe also change there to avoid duplication?