[publication] Can not enter email for collaborator #9590
Labels
27.0.0 - Bugs
Bugs Found in LORIS 27 testing
Category: Bug
PR or issue that aims to report or fix a bug
Module: publication
PR or issue related to the publication module
Milestone
Describe the bug

I added 2 collaborators, one that already existed in another publication project, and one new one. I could not add an email for the collaborator that already existed (i could click on the textbox, but no text would be entered). I assume this is because you cannot add a different email for a user that already exists, but I think it would be better if the email was added as a static non-editable field, or if an error is given if the email is different from what is already in the database.
To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):
What did you expect to happen?
Either the email to show automatically without being editable, or validation to make sure that the email matches what we already have
Browser Environment (please complete the following information):
Server Environment (if known):
Note: We only support the most recent release of LORIS.
Additional context
Add any other context about the problem here.
The following errors may be related:
PHP Fatal error: Uncaught PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'null' for column
test_dev_270.
publication.
projectat row 1 in /var/www/Loris/php/libraries/Database.class.inc:583\nStack trace:\n#0 /var/www/Loris/php/libraries/Database.class.inc(583): PDOStatement->execute()\n#1 /var/www/Loris/php/libraries/Database.class.inc(490): Database->_realupdate()\n#2 /var/www/Loris/modules/publication/ajax/FileUpload.php(628): Database->update()\n#3 /var/www/Loris/modules/publication/ajax/FileUpload.php(21): editProject()\n#4 /var/www/Loris/htdocs/AjaxHelper.php(120): require('...')\n#5 {main}\n thrown in /var/www/Loris/php/libraries/Database.class.inc on line 583, referer: https://test-dev-270.loris.ca/publication/view_project?id=1 [Fri Feb 21 13:51:00.073963 2025] [php:error] [pid 10203] [client 192.168.122.1:37196] PHP Fatal error: Uncaught PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'null' for column
test_dev_270.
publication.
projectat row 1 in /var/www/Loris/php/libraries/Database.class.inc:583\nStack trace:\n#0 /var/www/Loris/php/libraries/Database.class.inc(583): PDOStatement->execute()\n#1 /var/www/Loris/php/libraries/Database.class.inc(490): Database->_realupdate()\n#2 /var/www/Loris/modules/publication/ajax/FileUpload.php(628): Database->update()\n#3 /var/www/Loris/modules/publication/ajax/FileUpload.php(21): editProject()\n#4 /var/www/Loris/htdocs/AjaxHelper.php(120): require('...')\n#5 {main}\n thrown in /var/www/Loris/php/libraries/Database.class.inc on line 583, referer: https://test-dev-270.loris.ca/publication/view_project?id=1 PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[camibdn@gmail.com](mailto:camibdn@gmail.com)' for key 'UK_publication_collaborator_Email' in /var/www/Loris/php/libraries/Database.class.inc:415\nStack trace:\n#0 /var/www/Loris/php/libraries/Database.class.inc(415): PDOStatement->execute()\n#1 /var/www/Loris/php/libraries/Database.class.inc(232): Database->_realinsert()\n#2 /var/www/Loris/modules/publication/ajax/FileUpload.php(83): Database->insert()\n#3 /var/www/Loris/modules/publication/ajax/FileUpload.php(19): uploadPublication()\n#4 /var/www/Loris/htdocs/AjaxHelper.php(120): require('...')\n#5 {main}\n thrown in /var/www/Loris/php/libraries/Database.class.inc on line 415, referer: https://test-dev-270.loris.ca/publication [Fri Feb 21 14:00:14.580120 2025] [php:error] [pid 9787] [client 192.168.122.1:57108] PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[camibdn@gmail.com](mailto:camibdn@gmail.com)' for key 'UK_publication_collaborator_Email' in /var/www/Loris/php/libraries/Database.class.inc:415\nStack trace:\n#0 /var/www/Loris/php/libraries/Database.class.inc(415): PDOStatement->execute()\n#1 /var/www/Loris/php/libraries/Database.class.inc(232): Database->_realinsert()\n#2 /var/www/Loris/modules/publication/ajax/FileUpload.php(83): Database->insert()\n#3 /var/www/Loris/modules/publication/ajax/FileUpload.php(19): uploadPublication()\n#4 /var/www/Loris/htdocs/AjaxHelper.php(120): require('...')\n#5 {main}\n thrown in /var/www/Loris/php/libraries/Database.class.inc on line 415, referer: https://test-dev-270.loris.ca/publication PHP Fatal error: Uncaught TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, null given in /var/www/Loris/modules/publication/ajax/FileUpload.php:917\nStack trace:\n#0 /var/www/Loris/modules/publication/ajax/FileUpload.php(917): htmlspecialchars()\n#1 /var/www/Loris/modules/publication/ajax/FileUpload.php(618): editUploads()\n#2 /var/www/Loris/modules/publication/ajax/FileUpload.php(21): editProject()\n#3 /var/www/Loris/htdocs/AjaxHelper.php(120): require('...')\n#4 {main}\n thrown in /var/www/Loris/modules/publication/ajax/FileUpload.php on line 917, referer: https://test-dev-270.loris.ca/publication/view_project?id=2 [Fri Feb 21 13:59:43.802275 2025] [php:error] [pid 10462] [client 192.168.122.1:47334] PHP Fatal error: Uncaught TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, null given in /var/www/Loris/modules/publication/ajax/FileUpload.php:917\nStack trace:\n#0 /var/www/Loris/modules/publication/ajax/FileUpload.php(917): htmlspecialchars()\n#1 /var/www/Loris/modules/publication/ajax/FileUpload.php(618): editUploads()\n#2 /var/www/Loris/modules/publication/ajax/FileUpload.php(21): editProject()\n#3 /var/www/Loris/htdocs/AjaxHelper.php(120): require('...')\n#4 {main}\n thrown in /var/www/Loris/modules/publication/ajax/FileUpload.php on line 917, referer: https://test-dev-270.loris.ca/publication/view_project?id=2
The text was updated successfully, but these errors were encountered: