[OJS 2.4.8-1] Review problem - Missing upload file field

Hi,

The pictures attached should explain the problem itself.

Submission Review:

Logged as reviewer a:

Logged as reviewer b:

All debug options enabled, no errors.
files_dir with correct permissions.
Disabled all css changes, same problem.

Can anybody help me figure out why this is happening?

Thanks.

Hi @samueloph,

It looks to me as though a recommendation has been recorded by Reviewer A, although for some reason that field is showing blank in the screenshot. Have you made any changes to the system regarding reviewer recommendation options?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

No changes were made. Is there any query that i can run in our database that could help clarifying what’s happening?

Thanks

Hi @samueloph,

Have a look at…

 SELECT DISTINCT recommendation FROM review_assignments WHERE date_completed IS NOT NULL;

This should list all unique recommendations – they should be numeric. If you see an empty row, then that’s likely your problem review – it would suggest that a review was recorded with an empty recommendation, which (IIRC) shouldn’t be possible.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

mysql>  SELECT DISTINCT recommendation FROM review_assignments WHERE date_completed IS NOT NULL;
+----------------+
| recommendation |
+----------------+
|              1 |
|           NULL |
|              2 |
|              6 |
|              3 |
|              5 |
|              4 |
|              0 |
+----------------+
8 rows in set (0.02 sec)

May i assume that the “NULL” record is the problematic one? What could i do to fix that?

Hi @samueloph,

OTOH it might also be the 1. You can get a list of affected reviews by calling…

SELECT review_id, submission_id FROM review_assignments WHERE recommendation = 0 AND date_completed IS NOT NULL; 
SELECT review_id, submission_id FROM review_assignments WHERE recommendation IS NULL AND date_completed IS NOT NULL;

Then the best approach might be to reset the date_completed – returning the reviews to an active state the reviewers can work with. You’d do that for a given review_id like this:

UPDATE review_assignments SET date_completed = NULL WHERE review_id = 123;

…replacing 123 with the review ID you want to affect.

Please back up the database before working directly with it, in case I’ve made a mistake in the above!

Regards,
Alec Smecher
Public Knowledge Project Team

Sooo

mysql> SELECT review_id, submission_id FROM review_assignments WHERE recommendation = 0 AND date_completed IS NOT NULL; 
+-----------+---------------+
| review_id | submission_id |
+-----------+---------------+
|      3717 |          4092 |
|      3719 |          4092 |
|      3720 |          4092 |
.
.
.
+-----------+---------------+
135 rows in set (0.01 sec)

mysql> SELECT review_id, submission_id FROM review_assignments WHERE recommendation IS NULL AND date_completed IS NOT NULL;
+-----------+---------------+
| review_id | submission_id |
+-----------+---------------+
|         2 |           396 |
|         7 |           434 |
|         8 |           434 |
|        19 |           434 |
|        23 |           424 |
.
.
.
1043 rows in set (0.01 sec)

I think i’m in big trouble, looks like there’s something very wrong with our OJS.

Update (i knew i did ask help for this before):

Yeah, something’s wrong.

I’ve just tried to run that sql on the affected review (ftr the id was 4105) and the result was:

mysql> UPDATE review_assignments SET date_completed = NULL WHERE review_id = 4105;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1  Changed: 0  Warnings: 0

So i believe this means that the problem is not what we initially thought, right? Because date_completed is NULL.

I changed the due date to 25/09

mysql> select * from review_assignments where review_id=4105;
+-----------+---------------+-------------+---------------------+----------------+---------------------+---------------------+---------------------+----------------+-------------------+---------------------+---------------------+------------------------+----------+----------+-----------+------------------+------------+---------------+---------+-------+----------------+----------------+-------------------+---------------+------+-----------------+----------+--------------+
| review_id | submission_id | reviewer_id | competing_interests | recommendation | date_assigned       | date_notified       | date_confirmed      | date_completed | date_acknowledged | date_due            | last_modified       | reminder_was_automatic | declined | replaced | cancelled | reviewer_file_id | date_rated | date_reminded | quality | round | review_form_id | regret_message | date_response_due | review_method | step | review_round_id | stage_id | unconsidered |
+-----------+---------------+-------------+---------------------+----------------+---------------------+---------------------+---------------------+----------------+-------------------+---------------------+---------------------+------------------------+----------+----------+-----------+------------------+------------+---------------+---------+-------+----------------+----------------+-------------------+---------------+------+-----------------+----------+--------------+
|      4105 |          4373 |        6802 |                     |              0 | 2016-05-25 10:48:27 | 2016-08-18 20:17:56 | 2016-09-06 14:35:09 | NULL           | NULL              | 2016-09-25 00:00:00 | 2016-09-19 13:58:01 |                      0 |        0 |        0 |         0 |                0 | NULL       | NULL          |       0 |     1 |              0 |                | NULL              |             0 |    1 |               0 |        1 |            0 |
+-----------+---------------+-------------+---------------------+----------------+---------------------+---------------------+---------------------+----------------+-------------------+---------------------+---------------------+------------------------+----------+----------+-----------+------------------+------------+---------------+---------+-------+----------------+----------------+-------------------+---------------+------+-----------------+----------+--------------+
1 row in set (0.00 sec)

Could this be something related to a bad file upload made by the reviewer?

Thanks for your help.

Hi @samueloph,

Ah, that 0 in the recommendation column is the problem, I’ll bet. There is no valid 0 recommendation – it should be 1-6, corresponding to the constants defined in lib/pkp/classes/submission/reviewAssignment/PKPReviewAssignment.inc.php.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

GOTCHA!

UPDATE review_assignments SET recommendation = NULL WHERE review_id = 4105;

Fixed the problem, then i decided to check if there’s any other remaining zeroed entries and:

select * from review_assignments where recommendation = 0;
194 rows in set (0.01 sec)

So…

UPDATE review_assignments SET recommendation = NULL WHERE recommendation = 0;

Should deal with everything.

@asmecher Is there any use case where recommendation would be set to 0 instead of NULL and not be some kind of bug?
I’m asking this because i will then change all the 194 records and i don’t wanna break anything.

Hi @samueloph,

I can’t think of any reason this would happen – it’s not valid data. I suspect it’s connected to the plugin you mentioned earlier – it might be worth checking in with that developer.

Regards,
Alec Smecher
Public Knowledge Project Team