Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[statistics] 500 coming from dashboard #9353

Closed
regisoc opened this issue Sep 24, 2024 · 1 comment · Fixed by #9354
Closed

[statistics] 500 coming from dashboard #9353

regisoc opened this issue Sep 24, 2024 · 1 comment · Fixed by #9354
Assignees
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)

Comments

@regisoc
Copy link
Contributor

regisoc commented Sep 24, 2024

Describe the bug

Follows the last comment from #9232.

Tested it, not a same issue anymore: redirects to a 500.
image

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/

CenterID not initialized to a defined \CenterID object here.
Do we have a default site? The same kind might happen for ProjectID too.

To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):

  1. Go to LORIS main page
  2. Click on right panel, "My tasks" > "incomplete form"

image

  1. See error
@regisoc regisoc added the Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label) label Sep 24, 2024
driusan pushed a commit to driusan/Loris that referenced this issue Sep 24, 2024
Fix type errors on the page loaded from the link on the
LORIS dashboard for "data entry incomplete" in my tasks.

Fixes aces#9353
driusan pushed a commit to driusan/Loris that referenced this issue Sep 24, 2024
Fix type errors on the page loaded from the link on the
LORIS dashboard for "data entry incomplete" in my tasks.

Fixes aces#9353
driusan pushed a commit to driusan/Loris that referenced this issue Sep 24, 2024
Fix type errors on the page loaded from the link on the
LORIS dashboard for "data entry incomplete" in my tasks.

Fixes aces#9353
@driusan
Copy link
Collaborator

driusan commented Sep 24, 2024

This should be fixed by #9354

driusan pushed a commit to driusan/Loris that referenced this issue Sep 24, 2024
Fix type errors on the page loaded from the link on the
LORIS dashboard for "data entry incomplete" in my tasks.

Fixes aces#9353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug PR or issue introducing/requiring bug fixes (not mutually exclusive with the Feature label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants