Issue Number | 4126 |
---|---|
Summary | Display user friendly error messages |
Created | 2016-06-20 10:37:16 |
Issue Type | Bug |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Englisch, Volker (NIH/NCI) [C] |
Status | Closed |
Resolved | 2018-04-02 18:00:02 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.186503 |
When a required top level section title element is missing from a summary, the summary validates, however it fails to successfully generate PP. Meanwhile the error message that is displayed (see attached) does not help the user in trying to identify the problem. It would be helpful to display a more user friendly error message to aid the user in finding and fixing the problem.
List of errors:
1. Missing Top Level Section
2. Missing protocol (http) from Summary URL
3. Missing SummaryFragmentRef (OCECDR-4105)
4. Adding linking (copy and paste) elements but failing to complete link
by CTRL + Enter macro
5. When user fails to enter a CDR ID or enters only CDR ID but not
PubMed citation ID while updating a citation on the citations import
page on the advanced page, a python script error displays.
I am wondering if we can re-purpose this ticket to address other vague error messages mostly coming from percussion or gatekeeper when document fail PP? For example, here is another error that is displayed in the browser when the protocol is omitted from the Summary URL.
"CDRPreview web service error: Xml data validation error,The 'Err' element is not declared.Validation error occurred when validating the instance document.,6,3"
The error message is not helpful at all in identifying what the problem is with the document. I am sure with time, I will be able to provide many more examples.
Let's discuss this at our next meeting.
The original problem can only be solved with a filter change while your
new problem could likely be handled with a validation rule rather than a
filter change. That makes me think we shouldn't mix both problems in a
single ticket.
Updated ticked with error reported by ~JutheR in OCECDR-4105
Revised title to reflect requested changes
I have made the changes for item #1 when the PP report returns with an error message from Percussion. The modified file is PublishPreview.py.
Moving on to item #2. I've modified the URL to remove the _http://_ protocol from the SummaryURL
element but it doesn't cause the PP report to fail.
Would you be able to prepare a document on DEV so that I can see what
error message we encounter?
Here is one on DEV that is causing the same error message: CDR0000062945
I ran the PP report on the CWD for this summary on DEV without problems. Do you need me to run a different report or a different version to reproduce the error?
Please try again on the CWD. Somehow, I left the protocol in there. I was just able to reproduce the error message after removing it and saving a version.
It turns out that item #2 was actually a bug in our filter code that
only hit when the http protocol was left out.
This has been fixed now in the filters
CDR000157 (Vendor Filter: Summary)
CDR786432 (Module: URL Conversion)
For my information: This change is in the trunk sandbox
~juther and ~oseipokuw: Would it be possible to recreate that error for item #3 of the description on DEV? The referred ticket indicates a missing SummaryFragmentRef to have caused an error but I don't remember any details.
Also, it appears that item #4 is a XmetaL problem, right? If that's the case we'll need to create a separate ticket for that item because macro changes are not filter changes and are release dependent.
Error #3 happens when you link (SummaryFragmentRef) to a never published summary/document (tested with only summary). The QC Report does not work and produces the following error message:
<Errors> <Err>XSLT error: code: 61 msgtype:error code:61 module:Sablotron URI:cdrutil:/get-pv-num/CDR0000779306#_2 line:1 node:attribute 'encoding' msg:could not open document 'cdr:CDR0000779306/lastp' </Err> </Errors>
Check out CDR0000257995 (linked to unpublished/blocked CDR0000779306) on DEV.
Also, it appears that item #4 is a XmetaL problem, right? If that's the case we'll need to create a separate ticket for that item because macro changes are not filter changes and are release dependent.
Yes, this problem happens in XMetal. However, it is not necessarily a problem with the macro. The Macro works fine. However, if the user fails to complete the process (CTRL + Enter, Select retrieved doc, click OK). But leaves the element blank, that is when the error is displayed. Please let me know if I still need to create a new ticket for this.
Verified on DEV.
The following filters have been copied to QA for testing:
CDR000157 (Vendor Filter: Summary)
CDR786432 (Module: URL Conversion)
Since item #4 isn't a release independent filter change please create a separate ticket so that we can mark this ticket as resolved.
~oseipokuw: please link this ticket to the one Volker asked to be create for item #4, and close this ticket.
New ticket created and linked - OCECDR-4299
and close this ticket.
Looking at the comments, these changes have made it to QA but not yet to production. In addition, the filter changes could be promoted to PROD but the change to the PP report needs the help of CBIIT.
I suggest let's test the filter changes and promote these to PROD. Then we'll leave this ticket open and mark it for Hawking for the updates to the PublishPreview.py report.
The changes to PublishPreview.py have been moved from my subversion sandbox Feynman-hold to the git repository cdr-admin (cdr4126).
Saved changed in git repository admin:
PublishPreview.py [cdr4126 1e612604]
<type 'exceptions.AttributeError'> Python 2.7.13:
D:\Python\python.exe
Wed Nov 22 13:23:26 2017
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
D:\Inetpub\wwwroot\cgi-bin\cdr\CiteSearch.py in ()
147
#----------------------------------------------------------------------
148 if impReq:
=> 149 importID = importID.strip()
150 if not session: cdrcgi.bail("User not logged in")
151 article = fetchCitation(importID)
importID = None, importID.strip undefined
<type 'exceptions.AttributeError'>: 'NoneType' object has no
attribute 'strip'
args = ("'NoneType' object has no attribute 'strip'",)
message = "'NoneType' object has no attribute 'strip'"
D:\cdr\Log\tmpjxpffp.html contains the description of this error.
Here is another situation that would benefit from additional
information displayed to the user:
When running the PublishPreview report on a document for which no
publishable version exists a python error gets created and the log-file
contains the following message:
Exception: Unable to resolve uri u'CDR0000791241/lastp'
The following filter has been fixed in order to display a "nicer" error message when a SummaryFragmentRef is found pointing to a document without a publishable version (issue #3):
CDR0000335424.xml (Denormalization Filter: Summary)
https://github.com/NCIOCPL/cdr-server/commit/27abfdd
[ hawking ]
The following filters have been updated (issue #2):
CDR0000000157.xml (Vendor Filter: Summary)
CDR0000786432.xml (Module: URL Conversion)
https://github.com/NCIOCPL/cdr-server/commit/27abfdd
[ hawking ]
The following program has been updated on githup to address issue #1:
PublishPreview.py
https://github.com/NCIOCPL/cdr-admin/commit/832df26
[ hawking ]
The following script has been updated to avoid the listed error message in the comment from Nov. 22nd (addressing issue #5):
CiteSearch.py
https://github.com/NCIOCPL/cdr-admin/commit/edfd670
[ hawking ]
Verified on QA. Thanks!
Verified on PROD. Thanks!
File Name | Posted | User |
---|---|---|
Not linking.png | 2016-11-01 14:07:25 | Osei-Poku, William (NIH/NCI) [C] |
pub preview error message.docx | 2016-08-26 17:46:31 | Osei-Poku, William (NIH/NCI) [C] |
top level title error message.JPG | 2016-06-20 10:37:16 | Osei-Poku, William (NIH/NCI) [C] |
Elapsed: 0:00:00.001385