Details
-
Bug
-
Resolution: Fixed
-
Critical
-
COmanage Registry 3.3.0 (Magic Ring)
Description
To reproduce configure a self-signup enrollment flow to include an attribute of type g:co_group_member that is required with a default value. For example
{{ registry=# select * from cm_co_enrollment_attributes where id = 37;}}
{{ [ RECORD 1 ]------------+----------------------------------}}
{{ id | 37}}
{{ co_enrollment_flow_id | 6}}
{{ label | Untitled}}
{{ description | }}
{{ attribute | g:co_group_member}}
{{ required | 1}}
{{ required_fields | }}
{{ ordr | 4}}
{{ hidden | t}}
{{ copy_to_coperson | f}}
{{ ignore_authoritative | }}
{{ default_env | }}
{{ login | f}}
{{ language | }}
{{ created | 2020-06-19 09:08:13}}
{{ modified | 2020-06-19 09:08:13}}
{{ co_enrollment_attribute_id | }}
{{ revision | 0}}
{{ deleted | f}}
{{ actor_identifier | skoranda@dev.sphericalcowgroup.com}}
When the enrollee goes through the flow a stack trace will be thrown:
2020-06-19 09:09:06 Error: [ArgumentCountError] Too few arguments to function Validation::inList(), 1 passed in /srv/comanage-registry/lib/Cake/Model/Validator/CakeValidationRule.php on line 277 and at least 2 expected
Request URL: /registry/co_petitions/petitionerAttributes
Stack Trace:
#0 /srv/comanage-registry/lib/Cake/Model/Validator/CakeValidationRule.php(277): Validation::inList('7')
#1 /srv/comanage-registry/lib/Cake/Model/Validator/CakeValidationSet.php(135): CakeValidationRule->process('co_group_id', Array, Array)
#2 /srv/comanage-registry/lib/Cake/Model/ModelValidator.php(268): CakeValidationSet->validate(Array, false)
#3 /srv/comanage-registry/lib/Cake/Model/Model.php(3515): ModelValidator->errors(Array)
#4 /srv/comanage-registry/app/Model/CoPetition.php(3283): Model->invalidFields()
#5 /srv/comanage-registry/app/Model/CoPetition.php(3151): CoPetition->validateRelated('EnrolleeCoPerso...', Array, Array, Array)
#6 /srv/comanage-registry/app/Model/CoPetition.php(1703): CoPetition->validateModel('EnrolleeCoPerso...', Array, Array)
#7 /srv/comanage-registry/app/Controller/CoPetitionsController.php(2590): CoPetition->saveAttributes('32', 6, Array, 19)
#8 [internal function]: CoPetitionsController->petitionerAttributes()
#9 /srv/comanage-registry/lib/Cake/Controller/Controller.php(499): ReflectionMethod->invokeArgs(Object(CoPetitionsController), Array)
#10 /srv/comanage-registry/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
#11 /srv/comanage-registry/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(CoPetitionsController), Object(CakeRequest))
#12 /srv/comanage-registry/app/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#13 {main}