?
avatar chrisdavenport
chrisdavenport
16 Jul 2020

Steps to reproduce the issue

Set up a form with a subform field, making sure that
validate="subform"
is included.

Fill in the form and submit it.

Expected result

Form is handled without error.

Actual result

Error:
Joomla\CMS\Form\Form::validateField() rule subform missing.

System information (as much as possible)

Joomla 3.9.20 (although problem also occurs on earlier versions).

Additional comments

The problem is that the file /libraries/src/Form/Rule/SubFormRule.php should be renamed to /libraries/src/Form/Rule/SubformRule.php (note the lowercase "f" in "subform".

avatar chrisdavenport chrisdavenport - open - 16 Jul 2020
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jul 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 16 Jul 2020
avatar richard67
richard67 - comment - 16 Jul 2020

That will bring us back to the good old file rename problem when updating on Windows and old and new name only differ in case. @SharkyKZ Any idea how to solve this?

avatar SharkyKZ
SharkyKZ - comment - 16 Jul 2020

Use validate="SubForm"?

avatar chrisdavenport chrisdavenport - change - 16 Jul 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-07-16 15:47:15
Closed_By chrisdavenport
avatar chrisdavenport chrisdavenport - close - 16 Jul 2020
avatar chrisdavenport
chrisdavenport - comment - 16 Jul 2020

Strangely, that actually works! I have amended the documentation here: https://docs.joomla.org/Subform_form_field_type

Thanks @SharkyKZ

avatar SharkyKZ
SharkyKZ - comment - 16 Jul 2020

I'm not sure if this is the right long term solution though. We probably want to have consistent casing of Subform.

avatar chrisdavenport
chrisdavenport - comment - 16 Jul 2020

True, but that's a rabbit hole I don't have time to go down at this moment.

Add a Comment

Login with GitHub to post a comment