-
Notifications
You must be signed in to change notification settings - Fork 188
Description
Describe the bug
After creating a survey, starting the visit that that survey belongs to gives the following 500 error:
[Wed Dec 02 11:29:57.977649 2020] [php7:warn] [pid 7173] [client 192.168.122.1:32854] PHP Warning: Invalid argument supplied for foreach() in /var/www/loris/php/libraries/LorisForm.class.inc on line 1319, referer: https://ccna-test.loris.ca/next_stage/?candID=389332&sessionID=4661&identifier=4661 [Wed Dec 02 11:29:58.110963 2020] [php7:error] [pid 7173] [client 192.168.122.1:32854] PHP Fatal error: Uncaught Exception: Battery is not empty - will not clobber an existing battery. in /var/www/loris/php/libraries/NDB_BVL_Battery.class.inc:140\nStack trace:\n#0 /var/www/loris/modules/next_stage/php/next_stage.class.inc(124): NDB_BVL_Battery->createBattery(1, 'Visit', 'Neuropsychology...', 1, false)\n#1 /var/www/loris/php/libraries/NDB_Form.class.inc(157): LORIS\\next_stage\\Next_Stage->_process(Array)\n#2 /var/www/loris/php/libraries/LorisForm.class.inc(1432): NDB_Form->_save(Array)\n#3 /var/www/loris/php/libraries/NDB_Form.class.inc(128): LorisForm->process(Array)\n#4 /var/www/loris/php/libraries/NDB_Form.class.inc(187): NDB_Form->save()\n#5 /var/www/loris/src/Middleware/UserPageDecorationMiddleware.php(234): NDB_Form->handle(Object(Laminas\\Diactoros\\ServerRequest))\n#6 /var/www/loris/src/Middleware/PageDecorationMiddleware.php(56): LORIS\\Middleware\\UserPageDecorationMiddleware->process(Object(Laminas\\Diactoros\\ServerRequest), Object(LORIS\\next_stage\\Next_Stage))\n#7 /var/www/loris/php/libraries/NDB_Page.class.inc(692 in /var/www/loris/php/libraries/NDB_BVL_Battery.class.inc on line 140, referer: https://ccna-test.loris.ca/next_stage/?candID=389332&sessionID=4661&identifier=4661
To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):
- Set isDirectEntry=true for an instrument in test_names
- In survey accounts, create a survey for a visit that has not been started yet.
- Go to the timepoint list for the candidate that you created the survey for
- Try to start the visit that was chosen for the survey
- See error
- note that this is the same directions as [Survey Module] If survey instruments are created before the visit is started, instruments will not populate automatically once the visit is started. #7127