Issue Number | 486 |
---|---|
Summary | [Full Citation] More informative error messages on Full Citation page |
Created | 2018-10-19 11:37:12 |
Issue Type | Improvement |
Submitted By | Juthe, Robin (NIH/NCI) [E] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2019-10-03 10:16:34 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/oceebms/issue.234629 |
We should review the error messages we receive on the Full Citation page and consider whether they can be made more informative/helpful.
For example, we recently ran into an issue whereby we were unable to upload a large PDF (22MB) because it exceeded the threshold of 20MB. I posted a screenshot of the error message below, indicating that it was not a PDF. Ideally, the system would tell us that the file size was too large instead.
--git a/ebms.nci.nih.gov/modules/custom/ebms/citations.inc b/ebms.nci.nih.gov/modules/custom/ebms/citations.inc
diff 3473862..91bb736 100644
index --- a/ebms.nci.nih.gov/modules/custom/ebms/citations.inc
+++ b/ebms.nci.nih.gov/modules/custom/ebms/citations.inc
@@ -2631,7 +2631,8 @@ namespace {
$mime_type = Ebms\Util::get_mime_type($path);
if ($mime_type != 'application/pdf') {
htmlspecialchars($value) .
drupal_set_message(- ' is not a PDF file.', 'error');
+ ' is not a PDF file or exceeds the limit of 20MB.',
+ 'error');
continue;
}$file = file_save_upload($key, $validators);
(BTW, CBIIT tells me they're going to apply a fix for the JIRA bug which causes the bogus error message at the top of this comments. More than a year after the fix became available.)
Implemented on DEV.
Nothing is happening when we try to upload a file that exceeds the file limit. No error message appears. I'm thinking this may have been broken by the subsequent change to the mechanism/location for uploading full text articles? (OCEEBMS-524)
I've done some digging into this, and it appears that the software is
able to display the desired error message if the file size exceeds the
upload_max_filesize
limit of 20MB, as long as it does not
also exceed the post_max_size
of 32MB. I've asked my
colleagues if there is some way to work around this problem, but the
research I've done so far doesn't leave me optimistic. It is at least a
good thing that the software is able to assist those users who may be
uncertain about a borderline file as to whether it will exceed the lower
threshold. I suppose we could proactively put a warning on the form to
say "You can only upload a PDF file of 20MB or smaller. If you try to
upload a file which is larger than 32MB you won't even get an error
message." But that's probably the best we can do.
This is OK. I don't think files >32MB are very common. Could we modify the text on the form to remind us of the size limit? Here's what I suggest:
"Select a PDF file smaller than 20 MB to be uploaded."
Modification added (QA and DEV).
I'm not seeing this on DEV or QA. I'll post a screenshot from QA.
Sorry, please try again.
No problem. That looks good. Thank you!
Verified on QA.
File Name | Posted | User |
---|---|---|
EBMS PDF error message.png | 2018-10-19 11:37:21 | Juthe, Robin (NIH/NCI) [E] |
upload PDF.png | 2019-10-03 11:16:46 | Juthe, Robin (NIH/NCI) [E] |
Elapsed: 0:00:00.000733