CDR Tickets

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
Description

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

Comment entered 2019-03-14 19:26:58 by Englisch, Volker (NIH/NCI) [C]

You wouldn't happen to have an example of an old version where this link was still working, right?

Comment entered 2019-03-15 15:40:56 by Osei-Poku, William (NIH/NCI) [C]

Unfortunately not. Sorry.

Comment entered 2019-03-20 18:54:53 by Englisch, Volker (NIH/NCI) [C]

, 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.

Comment entered 2019-03-21 12:02:35 by Osei-Poku, William (NIH/NCI) [C]

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?

Comment entered 2019-03-22 18:10:03 by Englisch, Volker (NIH/NCI) [C]

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'))
 
Comment entered 2019-06-14 11:39:26 by Englisch, Volker (NIH/NCI) [C]

The following file has been modified and is ready for preview on DEV:

  • PublishPreview.py
    branch: cdr4594-pp-glossary

Comment entered 2019-06-21 08:23:38 by Osei-Poku, William (NIH/NCI) [C]

Verified on DEV. Thanks!

Comment entered 2019-06-21 14:15:54 by Englisch, Volker (NIH/NCI) [C]
Comment entered 2019-08-06 08:53:39 by Osei-Poku, William (NIH/NCI) [C]

Verified on QA. Thanks!

Comment entered 2019-09-09 09:34:19 by Osei-Poku, William (NIH/NCI) [C]

Verified on PROD. Thanks!

Elapsed: 0:00:00.000978