Context
Fails step A2 of the module test plan.
Describe the bug
When the user is granted the _View own site Electrophysiology Browser pages_ only, navigating to an individual session produces a 500 http error.
To Reproduce
View own site Electrophysiology Browser pages
- Make sure user is assigned a site and project which has candidate data. For the test VM specifically user was assigned site: Ottawa and project: pumpernickel.
- Navigate to the electrophysiology browser front page
- Click on either "raw" or "all types" link for one of the candidates
- Observe blank page (firefox) or 500 http error (chrome).
What did you expect to happen?
For the candidate session data to load and display the relevant information when the user tries to view an individual session.
Browser Environment (please complete the following information):
Server Environment (if known):
This was observed using the testing VM for loris
reproducing the bug on my local sandbox gives the following error log:
PHP Fatal error: Uncaught Error: Call to a member function getCenterID() on null in /var/www/loris/modules/electrophysiology_browser/php/sessions.class.inc:51\nStack trace:\n#0 /var/www/loris/php/libraries/Module.class.inc(351): LORIS\electrophysiology_browser\Sessions->_hasAccess(Object(User))\n#1 /var/www/loris/src/Middleware/ResponseGenerator.php(50): Module->handle(Object(Laminas\Diactoros\ServerRequest))\n#2 /var/www/loris/src/Middleware/AuthMiddleware.php(63): LORIS\Middleware\ResponseGenerator->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\electrophysiology_browser\Module))\n#3 /var/www/loris/src/Router/ModuleRouter.php(75): LORIS\Middleware\AuthMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\electrophysiology_browser\Module))\n#4 /var/www/loris/src/Router/BaseRouter.php(105): LORIS\Router\ModuleRouter->handle(Object(Laminas\Diactoros\ServerRequest))\n#5 /var/www/loris/src/Middleware/ResponseGenerator.php(50): LORIS\Router\BaseRouter->handle(Object(Laminas\Diactoros\ServerRequest))\n#6 in /var/www/loris/modules/electrophysiology_browser/php/sessions.class.inc on line 51, referer: http://localhost:8080/electrophysiology_browser/
relevant details missing here:
What site is your test user affiliated to?
Is there any data for that site in your database, which was expected to be displayed ?
Can you dig a little and figure out why it's failing? Should the links not have been clickable, or should there be data or a page or a permission that is just missing?
@AlexandraLivadas and @h-karim - Can you guys look into this together, when you have time later today or tomorrow ?
You can decide which of you should issue the PR to 23, given Alex is also assigned to #6558 on this module.
closed for duplication #6558