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

Add CenterID class to LORIS #7359

Merged
merged 33 commits into from
May 10, 2021
Merged

Add CenterID class to LORIS #7359

merged 33 commits into from
May 10, 2021

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Feb 26, 2021

This adds a new CenterID class and updates it throughout LORIS.

I updated SiteHaver and MultiSiteHaver interfaces, user->hasCenterID, and then followed through all the numerous phan errors that were introduced.

@driusan driusan added the "Help! I don't understand Travis!" PR is having a beef with TRAVIS. Someone needs to help label Mar 22, 2021
@driusan driusan force-pushed the CenterIDClass branch 4 times, most recently from 29be378 to 526a4c9 Compare March 24, 2021 17:52
@driusan driusan added Cleanup PR or issue introducing/requiring at least one clean-up operation and removed "Help! I don't understand Travis!" PR is having a beef with TRAVIS. Someone needs to help labels Mar 24, 2021
@kongtiaowang
Copy link
Contributor

Can't create a new new_profile.
Fatal error: Uncaught TypeError: Candidate::createNew(): Argument #1 ($centerID) must be of type CenterID, string given, called in /var/www/html/modules/new_profile/php/new_profile.class.inc on line 81 and defined in /var/www/html/php/libraries/Candidate.class.inc:216
Stack trace:
#0 /var/www/html/modules/new_profile/php/new_profile.class.inc(81): Candidate::createNew('2', '2021-04-12', NULL, Object(LORIS\StudyEntities\Candidate\Sex), NULL, Object(ProjectID))
#1 /var/www/html/php/libraries/NDB_Form.class.inc(104): LORIS\new_profile\New_Profile->_process(Array)
#2 /var/www/html/php/libraries/LorisForm.class.inc(1453): NDB_Form->_save(Array)
#3 /var/www/html/php/libraries/NDB_Form.class.inc(75): LorisForm->process(Array)
#4 /var/www/html/modules/new_profile/php/new_profile.class.inc(106): NDB_Form->save()
#5 /var/www/html/src/Middleware/UserPageDecorationMiddleware.php(240): LORIS\new_profile\New_Profile->handle(Object(Laminas\Diactoros\ServerRequest))
#6 /var/www/html/src/Middleware/PageDecorationMiddleware.php(56): LORIS\Middleware\UserPageDecorationMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\new_profile\New_Profile))
#7 /var/www/html/php/libraries/NDB_Page.class.inc(708): LORIS\Middleware\PageDecorationMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\new_profile\New_Profile))
#8 /var/www/html/php/libraries/Module.class.inc(411): NDB_Page->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\new_profile\New_Profile))
#9 /var/www/html/src/Middleware/ResponseGenerator.php(50): Module->handle(Object(Laminas\Diactoros\ServerRequest))
#10 /var/www/html/src/Middleware/AuthMiddleware.php(63): LORIS\Middleware\ResponseGenerator->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\new_profile\Module))
#11 /var/www/html/src/Router/ModuleRouter.php(74): LORIS\Middleware\AuthMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\new_profile\Module))
#12 /var/www/html/src/Middleware/ExceptionHandlingMiddleware.php(35): LORIS\Router\ModuleRouter->handle(Object(Laminas\Diactoros\ServerRequest))
#13 /var/www/html/src/Router/BaseRouter.php(112): LORIS\Middleware\ExceptionHandlingMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\Router\ModuleRouter))
#14 /var/www/html/src/Middleware/ResponseGenerator.php(50): LORIS\Router\BaseRouter->handle(Object(Laminas\Diactoros\ServerRequest))
#15 /var/www/html/src/Middleware/ContentLength.php(52): LORIS\Middleware\ResponseGenerator->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\Router\BaseRouter))
#16 /var/www/html/htdocs/index.php(48): LORIS\Middleware\ContentLength->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\Router\BaseRouter))
#17 {main}
thrown in /var/www/html/php/libraries/Candidate.class.inc on line 216

@driusan
Copy link
Collaborator Author

driusan commented Apr 26, 2021

@kongtiaowang should be fixed (assuming it still passes GitHub actions after a rebase..)

@kongtiaowang
Copy link
Contributor

@driusan last issue.
dicom_archive can't load.
http://localhost:8081/dicom_archive/?format=json

Fatal error: Uncaught TypeError: ValidatableIdentifier::__construct(): Argument #1 ($value) must be of type string, null given, called in /var/www/html/modules/dicom_archive/php/dicomarchiverowprovisioner.class.inc on line 75 and defined in /var/www/html/php/libraries/ValidatableIdentifier.php:57 Stack trace: #0 /var/www/html/modules/dicom_archive/php/dicomarchiverowprovisioner.class.inc(75): ValidatableIdentifier->__construct(NULL) #1 /var/www/html/src/Data/Provisioners/DBRowProvisioner.php(118): LORIS\dicom_archive\DicomArchiveRowProvisioner->getInstance(Array) #2 [internal function]: IteratorIterator@anonymous->current() #3 [internal function]: IteratorIterator->next() #4 /var/www/html/src/Data/Table.php(83): FilterIterator->next() #5 /var/www/html/src/Data/Table.php(98): LORIS\Data\Table->toArray(Object(User)) #6 /var/www/html/php/libraries/DataFrameworkMenu.class.inc(144): LORIS\Data\Table->toJSON(Object(User)) #7 /var/www/html/php/libraries/NDB_Menu_Filter.class.inc(648): DataFrameworkMenu->toJSON() #8 /var/www/html/php/libraries/NDB_Page.class.inc(728): NDB_Menu_Filter->display() #9 /var/www/html/php/libraries/DataFrameworkMenu.class.inc(169): NDB_Page->handle(Object(Laminas\Diactoros\ServerRequest)) #10 /var/www/html/php/libraries/NDB_Page.class.inc(707): DataFrameworkMenu->handle(Object(Laminas\Diactoros\ServerRequest)) #11 /var/www/html/php/libraries/Module.class.inc(414): NDB_Page->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\dicom_archive\Dicom_Archive)) #12 /var/www/html/modules/dicom_archive/php/module.class.inc(72): Module->handle(Object(Laminas\Diactoros\ServerRequest)) #13 /var/www/html/src/Middleware/ResponseGenerator.php(50): LORIS\dicom_archive\Module->handle(Object(Laminas\Diactoros\ServerRequest)) #14 /var/www/html/src/Middleware/AuthMiddleware.php(63): LORIS\Middleware\ResponseGenerator->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\dicom_archive\Module)) #15 /var/www/html/src/Router/ModuleRouter.php(74): LORIS\Middleware\AuthMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\dicom_archive\Module)) #16 /var/www/html/src/Middleware/ExceptionHandlingMiddleware.php(35): LORIS\Router\ModuleRouter->handle(Object(Laminas\Diactoros\ServerRequest)) #17 /var/www/html/src/Router/BaseRouter.php(112): LORIS\Middleware\ExceptionHandlingMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\Router\ModuleRouter)) #18 /var/www/html/src/Middleware/ResponseGenerator.php(50): LORIS\Router\BaseRouter->handle(Object(Laminas\Diactoros\ServerRequest)) #19 /var/www/html/src/Middleware/ContentLength.php(52): LORIS\Middleware\ResponseGenerator->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\Router\BaseRouter)) #20 /var/www/html/htdocs/index.php(48): LORIS\Middleware\ContentLength->process(Object(Laminas\Diactoros\ServerRequest), Object(LORIS\Router\BaseRouter)) #21 {main} thrown in /var/www/html/php/libraries/ValidatableIdentifier.php on line 57

@driusan
Copy link
Collaborator Author

driusan commented Apr 28, 2021

@kongtiaowang need to see if it still passes the tests but it should be fixed.

Copy link
Contributor

@kongtiaowang kongtiaowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kongtiaowang kongtiaowang added the Passed manual tests PR has been successfully tested by at least one peer label May 8, 2021
@driusan driusan merged commit c38f1c1 into aces:main May 10, 2021
AlexandraLivadas pushed a commit to AlexandraLivadas/Loris that referenced this pull request Jun 29, 2021
This adds a new CenterID class and updates it throughout LORIS.
@ridz1208 ridz1208 added this to the 24.0.0 milestone Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup PR or issue introducing/requiring at least one clean-up operation Passed manual tests PR has been successfully tested by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants