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

email is still compulsory in quicksubmit in ojs 3.4 #14

Open
SupremeDimeji opened this issue Dec 1, 2023 · 7 comments
Open

email is still compulsory in quicksubmit in ojs 3.4 #14

SupremeDimeji opened this issue Dec 1, 2023 · 7 comments
Assignees

Comments

@SupremeDimeji
Copy link

The email field is still compulsory when adding contributors through the quicksubmit plugin in ojs 3.4.0.3.

@ewhanson ewhanson self-assigned this Dec 1, 2023
@ewhanson
Copy link
Collaborator

ewhanson commented Dec 1, 2023

Hi @SupremeDimeji, thanks for noticing this. It looks like the QuickSubmit plugin uses the old version of the author/contributor form. I'll look into adding support for that back into the plugin.

@mpbraendle
Copy link
Contributor

To add up: It is not only so for QuickSubmit, but also the standard submission process.

We get the following problems:

During the submission workflow, when a contributor is being added:
[Tue Jul 16 23:12:55.355724 2024] [proxy_fcgi:error] [pid 1571494:tid 1571494] [client 83.76.22.66:57301] AH01071: Got error 'PHP message: Slim Application Error:\nType: Illuminate\Database\QueryException\nCode: 23000\nMessage: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'email' cannot be null (SQL: insert into authors (email, include_in_browse, publication_id, seq, user_group_id) values (?, 1, 7400, 0, 14))\nFile: /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php\nLine: 760\nTrace: #0 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()\n#1 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(546): Illuminate\Database\Connection->run()\n#2 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(498): Illuminate\Database\Connection->statement()\n#3 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/...', referer: https://www.chimia.ch/chimia/submission?id=7378

When the column email in the database is set to nullable, there is a follow-up error in a vendor library:

Got error 'PHP message: Slim Application Error:\nType: TypeError\nMessage: Symfony\Component\Mime\Address::__construct(): Argument #1 ($address) must be of type string, null given, called in /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Mail/Message.php on line 244\nFile: /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/symfony/mime/Address.php\nLine: 42\nTrace: #0 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Mail/Message.php(244): Symfony\Component\Mime\Address->__construct()\n#1 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Mail/Message.php(108): Illuminate\Mail\Message->addAddresses()\n#2 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(401): Illuminate\Mail\Message->to()\n#3 /var/www/virtual/ojs.chimia.ch/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(206): Illum...', referer: ...

So, the OJS 3.4 version of this plugin is not usable and even hampering the submission workflow. We had to disable it.

@ewhanson
Copy link
Collaborator

Hi @mpbraendle, thanks for sharing the error messages. I was unable to reproduce it locally even though it seems like I should be receiving the same error. The email column is successfully being set to null even though it looks like the table schema should have it as not null. Could you share which database/database version, PHP version, exact OJS version you're using? Thanks.

@mpbraendle
Copy link
Contributor

Hi @ewhanson

OJS 3.4.0-5
PHP 8.0.30
MariaDB Server 10.6.17

I think, the problem is the check in the Laravel library Message.php that checks for all types of mail format errors.

@ewhanson
Copy link
Collaborator

Thanks @mpbraendle. When you run into the issue with the Laravel library class you mention and you talk about the email column being nullable, are you referring to this validation rule from the plugin:

$schema->properties->email->validation[] = 'nullable';

or have you manually set the column to be nullable in the database?

@mpbraendle
Copy link
Contributor

For testing, I had set the database column temporarily to nullable.

This allowed to create the contributor record, however, then the Laravel Message.php complains.
Also, when an empty string "" or '' is saved, the Laravel Message.php complains.

@ewhanson
Copy link
Collaborator

ewhanson commented Jul 31, 2024

Hi @mpbraendle, thanks for sharing the additonal details. I have yet to be able to reproduce either the email still being required as part of the regular submission workflow or or the Laravel-related error you described. I've tried using the exact versions of OJS/mariadb you've described and still haven't been able to reproduce it.

Do you have any settings or options set up for mariadb that might be stricter than normal? That is the best guess I have at the moment unfortunately.

Edit: I don't recall the exact patch version, but I've tested it with PHP 8.0 and PHP 8.2 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants