Loris
Loris copied to clipboard
[cbig][instrument/statistics] Dashboard redirection to statistics works but result table is empty
Describe the bug
Clicking the incomplete forms link inside the LORIS dashboard works but goes to an empty table. During testing lots of errors are printed in the logs but nothing on the UI.
To Reproduce Steps to reproduce the behavior (attach screenshots if applicable):
- Go to Dashboard/main page > click the right hand side incomplete form.
- See error
This is expected since CBIG does not use instrument tables while the stats module expects it
Ok, thanks. Is it a non issue? Widget should be deactivated?
@regis, module should be deactivated if you ask me but maybe?
What do you mean "does not use instrument tables while the stats module expects it"? Does the stats module not work with json data?
@driusan Unless I'm missing something in the code, some special case, no it doesnt sem like it. it literally joins on the table in the SQL query.
That doesn't make sense. The completion status is on the flag table, not the instrument table. It looks like it's just doing it to do WHERE i.CommentID NOT LIKE 'DDE%'
but that can just as easily be done with the CommentID from the flag table (which is used to join the instrument table in the first place.)
actually the inner join is implicitly filtering out other instruments too, but that can be done with the test_name on the flag table.
@driusan I'm not saying it cant be fixed, I'm saying its not working currently thats it
Tested it, not a same issue anymore: redirects to a 500.
This is the log:
PHP Fatal error: Uncaught TypeError: LORIS\\statistics\\Statistics_Site::_checkCriteria(): Argument #1 ($centerID) must be of type CenterID, string given, called in /var/www/Loris/modules/statistics/php/statistics_site.class.inc on line 189 and defined in /var/www/Loris/modules/statistics/php/statistics_site.class.inc:97\nStack trace:\n#0 /var/www/Loris/modules/statistics/php/statistics_site.class.inc(189): LORIS\\statistics\\Statistics_Site->_checkCriteria()\n#1 /var/www/Loris/modules/statistics/php/statistics_site.class.inc(277): LORIS\\statistics\\Statistics_Site->_completeCount()\n#2 /var/www/Loris/php/libraries/NDB_Page.class.inc(741): LORIS\\statistics\\Statistics_Site->setup()\n#3 /var/www/Loris/src/Middleware/UserPageDecorationMiddleware.php(247): NDB_Page->handle()\n#4 /var/www/Loris/src/Middleware/PageDecorationMiddleware.php(58): LORIS\\Middleware\\UserPageDecorationMiddleware->process()\n#5 /var/www/Loris/php/libraries/NDB_Page.class.inc(725): LORIS\\Middleware\\PageDecorationMiddleware->process()\n#6 /var/www/Loris/php/libraries/Module.class.inc(321): NDB_Page->process()\n#7 /var/www/Loris/src/Middleware/ResponseGenerator.php(50): Module->handle()\n#8 /var/www/Loris/src/Middleware/AuthMiddleware.php(63): LORIS\\Middleware\\ResponseGenerator->process()\n#9 /var/www/Loris/src/Router/ModuleRouter.php(74): LORIS\\Middleware\\AuthMiddleware->process()\n#10 /var/www/Loris/src/Middleware/ExceptionHandlingMiddleware.php(54): LORIS\\Router\\ModuleRouter->handle()\n#11 /var/www/Loris/src/Router/BaseRouter.php(132): LORIS\\Middleware\\ExceptionHandlingMiddleware->process()\n#12 /var/www/Loris/src/Middleware/ResponseGenerator.php(50): LORIS\\Router\\BaseRouter->handle()\n#13 /var/www/Loris/src/Middleware/ContentLength.php(52): LORIS\\Middleware\\ResponseGenerator->process()\n#14 /var/www/Loris/htdocs/index.php(73): LORIS\\Middleware\\ContentLength->process()\n#15 {main}\n thrown in /var/www/Loris/modules/statistics/php/statistics_site.class.inc on line 97, referer: https://rongarocarcy-dev.loris.ca/
@driusan CenterID not initialized to a defined \CenterID object here. Do we have a default site? The same kind might happen for ProjectID too.
Resolved by https://github.com/aces/Loris/pull/9252, new issue to be created for Regis's last comment