[publication] Can not edit publication #9594
Labels
27.0.0 - Bugs
Bugs Found in LORIS 27 testing
Module: publication
PR or issue related to the publication module
Milestone
Describe the bug
I tried editing an open publication from both the creator of the publication, and a user listed in "users with edit permission".
I edited some fields and then clicked "Submit", and nothing happened (no failure swal or success swal) but a 500 error was thrown. When refreshing, some of the fields were edited, and some were not. The fields that were edited were the "user with edit permission" field and removing a collaborator. I was not able to edit the description or project.
For other publication projects with fewer fields filled out, I was able to edit successfully with a "Success" swal. I'm not sure what the specific problem was that caused it to not be editable.
The same project that could not be edited also had other issues, like not being able to load for a user with the approve / reject permission.
To Reproduce
Steps to reproduce the behavior (attach screenshots if applicable):
What did you expect to happen?
It should be editable with a swal showing if it was successful or unsuccessful. It should always be able to load, and have the approval status changed.
Browser Environment (please complete the following information):
Server Environment (if known):
Note: We only support the most recent release of LORIS.
Additional context
Some of 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: