User tests: Successful: Unsuccessful:
A repeatable field without content causes a warning in an article.
Make a custom field of type repeatable and save it without adding a field.
Then open an article.
The article is displayed
Warning: Invalid argument supplied for foreach() in plugins\fields\repeatable\repeatable.php on line 89
idk
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
Title |
|
Title |
|
Labels |
Added:
?
|
Looks better. Just to check with this change do we get an error if the field is set as required in XML?
It makes no difference. With this PR there is no warning, that's all.
But it is possible to save a repeatable field (the container) with required=false
and no field in it.
This results in fields which looks like this:
So I wanted to make sure that at least one input field must be added to a repeatable.
But could be another issue / PR.
I have tested this item
In generell, don't know about repeatable fields yet :-)
But confirm Actual Result. After Patch: Warning has gone.
I am not able to reproduce the warning before the PR.
Could you save a repeatable field without a field?
Yes
I tested with the latest development branch.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-02-25 19:25:20 |
Closed_By | ⇒ | chmst |
This should be optional instead. On line 89 we should allow the field to be empty unless the required attribute is set to true