EBMS Tickets

Issue Number 502
Summary [Drupal Core Testing] Error upon uploading documents to an event
Created 2019-02-05 15:20:50
Issue Type Task
Submitted By Juthe, Robin (NIH/NCI) [E]
Assigned To Kline, Bob (NIH/NCI) [C]
Status Closed
Resolved 2019-08-01 14:24:26
Resolution Fixed
Path /home/bkline/backups/jira/oceebms/issue.239715
Description

There is a sporadic AJAX error message appearing when uploading documents to an agenda using the browse and upload options on the create event page. This isn't happening every time and I haven't figured out the pattern yet. Please see screenshot below.

Comment entered 2019-02-05 15:21:39 by Juthe, Robin (NIH/NCI) [E]

Oops, I meant to log this as a bug rather than a task. Sorry about that.

Comment entered 2019-02-05 17:50:07 by Kline, Bob (NIH/NCI) [C]

Next time it happens, could you include the body of the error message (cut off in the screen shot)?

Comment entered 2019-02-06 09:59:24 by Juthe, Robin (NIH/NCI) [E]

It seems to be working fine now (go figure), but I'll post an updated screenshot if we are able to reproduce the problem. Thanks.

Comment entered 2019-02-06 10:07:48 by Juthe, Robin (NIH/NCI) [E]

Robin B just got the error message to come up again. She sent me three screenshots including the full error message so I will upload those shortly.

Comment entered 2019-02-10 16:38:09 by Kline, Bob (NIH/NCI) [C]

An attempt to refresh QA using Jenkins last fall appears to have corrupted the site, and the database doesn't match what's in the file system. So …

  1. a user tries to post a file

  2. Drupal extracts the file name from the request

  3. Drupal checks the file system to see if the file is already present

  4. the file isn’t there, so Drupal doesn’t bother to create a distinguished unique name for the URI

  5. a SQL INSERT query is submitted to add a row to the file_managed table

  6. the uri column of that table has a `UNIQUE` constraint on it, so the query throws an exception

There are many thousands of files in the database (over 16K) on QA which aren’t in the file system, and testers user whatever files they have lying around on their computers, or they download files from the production system when testing on the lower tiers, so it’s not a big surprise that they’d run into such conflicts on a system that’s as badly corrupted as QA is.

The solution will be to get CBIIT to provide backups of the database and the file system from the production site and use them to get QA back to a sane state, then apply the Drupal core upgrade and the patch for the citation queue problem fixed a week or two ago, and then have the users test again.

Comment entered 2019-02-11 15:01:42 by Kline, Bob (NIH/NCI) [C]

and : I'll be taking down the EBMS QA web server to correct the problem described in the previous comment. Will let you know when it's back up.

Comment entered 2019-02-11 16:36:20 by Kline, Bob (NIH/NCI) [C]

QA has been refreshed from PROD. Please try this again.

Comment entered 2019-02-12 16:34:56 by Juthe, Robin (NIH/NCI) [E]

Verified on QA. Thanks!

Attachments
File Name Posted User
EBMS event doc error msg 1.png 2019-02-06 10:09:12 Juthe, Robin (NIH/NCI) [E]
EBMS event doc error msg 2.png 2019-02-06 10:09:16 Juthe, Robin (NIH/NCI) [E]
EBMS event doc error msg 3.png 2019-02-06 10:09:20 Juthe, Robin (NIH/NCI) [E]

Elapsed: 0:00:00.000234