Issue Number | 4594 |
---|---|
Summary | [Glossary] Related Glossary Term Name links not working in pub preview |
Created | 2019-03-13 12:12:33 |
Issue Type | Bug |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Englisch, Volker (NIH/NCI) [C] |
Status | Closed |
Resolved | 2019-06-14 11:40:25 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.241371 |
Related Glossary Term Name links appear to be broken in pub preview.
When you click on the link in pub preview, nothing happens. It does work
on Cancer.gov though.
Sample documents:
777030
441252
You wouldn't happen to have an example of an old version where this link was still working, right?
Unfortunately not. Sorry.
~oseipokuw, you said at last week's CDR meeting that these Related Glossary Term links used to work in the PP report. I'm wondering if you're mixing this up with the other types of Related links. It is true that the More Info links for RelatedSummaryRef and RelatedDrugSummaryRef are working in PP and this is because we are providing the URL to the linked documents as part of the vendor output. For the RelatedGlossaryTermRef, however, we are not including the URL to these documents in the vendor output. In fact, we have code in the PP report that specifically renders a GlossaryTerm link dead, so that you don't click on it and receive an error page.
I think that it is possible that the RelatedGlossaryTermRef never worked before as I don't thinks we have too many of them. But why would it work on Cancer.gov and not in Pub Preview?
Here are the changes to implement as part of Joule:
DEV:d:\Inetpub\wwwroot\cgi-bin\cdr>diff -C 3 PublishPreview.py h:\temp
*** PublishPreview.py Fri Mar 22 17:57:37 2019
--- "h:\\temp/PublishPreview.py" Tue Feb 12 16:17:39 2019
***************
*** 461,471 ****
# Resetting the glossary links so we don't follow
# a dead end.
else:
! #x.set('onclick', 'return false')
! #x.set('ohref', link)
! ppLink = '/cgi-bin/cdr/PublishPreview.py?Session=guest'
! ppLink += '&DocId=%s' % link.split('=')[1]
! x.set('href', ppLink)
x.set('ohref', link)
x.set('type', 'Dead-link')
#showProgress(' Link disabled')
--- 461,467 ----
# Resetting the glossary links so we don't follow
# a dead end.
else:
! x.set('onclick', 'return false')
x.set('ohref', link)
x.set('type', 'Dead-link')
#showProgress(' Link disabled')
***************
*** 559,570 ****
pattern7 = re.compile('https://cdr.cancer.gov/cgi-bin/cdr/GetCdrImage.py') html = pattern7.sub("%s/cgi-bin/cdr/GetCdrImage.py" % cdr.CBIIT_NAMES[2],
html)
!
! # Write out the HTML file for debugging purposes
! # ----------------------------------------------
! if dbgLog:
! fp = open(cdr.WORK_DRIVE + ":/tmp/pp-%s.html" % docId, "wb")
! fp.write(html)
! fp.close()
!
cdrcgi.sendPage("%s" % html.decode('utf-8'))
--- 555,561 ----
pattern7 = re.compile('https://cdr.cancer.gov/cgi-bin/cdr/GetCdrImage.py') html = pattern7.sub("%s/cgi-bin/cdr/GetCdrImage.py" % cdr.CBIIT_NAMES[2],
html)
! fp = open(cdr.WORK_DRIVE + ":/tmp/pp-%s.html" % docId, "wb")
! fp.write(html)
! fp.close()
cdrcgi.sendPage("%s" % html.decode('utf-8'))
The following file has been modified and is ready for preview on DEV:
PublishPreview.py
branch: cdr4594-pp-glossary
Verified on DEV. Thanks!
The changes have been merged into our release branch Joule:
https://github.com/NCIOCPL/cdr-admin/commit/a505836
Verified on QA. Thanks!
Verified on PROD. Thanks!
Elapsed: 0:00:00.000978