Issue Number | 5029 |
---|---|
Summary | Language toggle broken for glossary terms with more than 75 characters |
Created | 2021-09-20 18:49:21 |
Issue Type | Task |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2023-06-02 07:52:16 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.299157 |
Below is the email communication between Volker and me with regards to this issue.
Hi Volker,
Would you know why this is a problem, I don’t seen any issues in the CDR and I was going to create a CGov ticket but I thought I would check with you first. This term document 512779 uses this definition document CDR0000620166. The dictionary and audience elements appear to be correctly set in the definition document. However, when you toggle from the Spanish to it English, it works.
https://www.cancer.gov/espanol/publicaciones/diccionarios/diccionario-cancer/def/512779
However, toggling from English to Spanish does not work.
You get the boiler plate landing page:
Diccionario de cáncer del NCI - Instituto Nacional del Cáncer (cancer.gov)
Both terms are in their respective dictionaries. What could be wrong here? I could only suspect that it is because the name of the term is too long or because one of the URLs is using the CDR ID and the other the name of the term?
Thanks,
William
Thank you,
William
From: Englisch, Volker (NIH/NCI) [C]
<volker@mail.nih.gov>
Sent: Monday, September 20, 2021 6:14 PM
To: Osei-Poku, William (NIH/NCI) [C]
<oseipokuw@mail.nih.gov>
Subject: Re: 512779 toggle from Spanish to English not
working
Yes and also link to that GitHub ticket. It’s likely that Lindsay or Bryan will have to weigh in but let’s start with a CDR ticket because we are creating the data for the dictionaries.
Thanks,
Volker
Volker Englisch
NCI OCPL – Office of Communications & Public Liaison
Contractor: publicis sapient
NCI: 240-276-6583
From: "Osei-Poku, William (NIH/NCI) [C]" <oseipokuw@mail.nih.gov>
Date: Monday, September 20, 2021 at 18:10
To: Volker Englisch <volker@mail.nih.gov>
Subject: RE: 512779 toggle from Spanish to English not
working
I looked a few of them and they have the same problem. Should I create a CDR ticket for this?
Thank you,
William
From: Englisch, Volker (NIH/NCI) [C] <volker@mail.nih.gov>
Sent: Monday, September 20, 2021 5:48 PM
To: Osei-Poku, William (NIH/NCI) [C] <oseipokuw@mail.nih.gov>
Subject: Re: 512779 toggle from Spanish to English not
working
I agree, we may want to talk about this again. The “empty pretty-URL” was introduced because there are so many drugs with super-long names. I didn’t realize it was applied to both dictionaries. It’s fine to drop the name for drugs because they don’t have a language toggle but it’s tricky for glossaries.
Maybe we can see how many longer-than-75 glossaries are there and increase the limit for glossaries. There seems to be a limit for the field itself, so increasing the number of characters wouldn’t prevent this problem from happening completely but it might be enough to prevent it for glossaries.
Thanks,
Volker
Volker Englisch
NCI OCPL – Office of Communications & Public Liaison
Contractor: publicis sapient
NCI: 240-276-6583
From: "Osei-Poku, William (NIH/NCI) [C]" <oseipokuw@mail.nih.gov>
Date: Monday, September 20, 2021 at 13:50
To: Volker Englisch <volker@mail.nih.gov>
Subject: RE: 512779 toggle from Spanish to English not
working
Yes, I remember the discussions about this, but I didn’t realize this could break the toggle. The Spanish term is 76 characters long so that is definitely the culprit. It seems to me that the solution Margaret and Robin agreed on was that we would manually prevent this from happening. I will check with the Spanish team whether it is possible to keep it at 75 characters or less. If not, we may have to talk about it to determine another solution.
Thank you,
William
From: Englisch, Volker (NIH/NCI) [C] <volker@mail.nih.gov>
Sent: Monday, September 20, 2021 1:10 PM
To: Osei-Poku, William (NIH/NCI) [C] <oseipokuw@mail.nih.gov>
Subject: Re: 512779 toggle from Spanish to English not
working
It looks like this is a feature. Pretty URL names are left blank if they are longer than 75 characters. Some drugs are way longer and in order to prevent duplicate keys due to cutting off the dictionary string those extra long names are left blank.
You may look at the reasoning for this decision here:
https://github.com/NCIOCPL/glossary-api/issues/98
Thanks,
Volker
Volker Englisch
NCI OCPL – Office of Communications & Public Liaison
Contractor: publicis sapient
NCI: 240-276-6583
From: "Osei-Poku, William (NIH/NCI) [C]" <oseipokuw@mail.nih.gov>
Date: Monday, September 20, 2021 at 12:38
To: Volker Englisch <volker@mail.nih.gov>
Subject: RE: 512779 toggle from Spanish to English not
working
Yes, the definition document was updated with just an editorial change. It is hard to tell if it worked in the past.
Thank you,
William
From: Englisch, Volker (NIH/NCI) [C] <volker@mail.nih.gov>
Sent: Monday, September 20, 2021 12:33 PM
To: Osei-Poku, William (NIH/NCI) [C] <oseipokuw@mail.nih.gov>
Subject: Re: 512779 toggle from Spanish to English not
working
These have been updated over the weekend, right? Do we know if that problem existed before the update or is it new since the update?
I see that the Spanish version doesn’t include the pretty URL name, so that’s why the software can’t link the Spanish to the English version. I’ll have to look at the publishing log files to see if I can find anything. I’m wondering if there is a problem with the length of the term name when it’s converted to the pretty URL name.
Thanks,
Volker
Volker Englisch
NCI OCPL – Office of Communications & Public Liaison
Contractor: publicis sapient
NCI: 240-276-6583
From: "Osei-Poku, William (NIH/NCI) [C]" <oseipokuw@mail.nih.gov>
Date: Monday, September 20, 2021 at 11:50
To: Volker Englisch <volker@mail.nih.gov>
Subject: 512779 toggle from Spanish to English not
working
Hi Volker,
Would you know why this is a problem, I don’t seen any issues in the CDR and I was going to create a CGov ticket but I thought I would check with you first. This term document 512779 uses this definition document CDR0000620166. The dictionary and audience elements appear to be correctly set in the definition document. However, when you toggle from the Spanish to it English, it works.
https://www.cancer.gov/espanol/publicaciones/diccionarios/diccionario-cancer/def/512779
However, toggling from English to Spanish does not work.
You get the boiler plate landing page:
Diccionario de cáncer del NCI - Instituto Nacional del Cáncer (cancer.gov)
Both terms are in their respective dictionaries. What could be wrong here? I could only suspect that it is because the name of the term is too long or because one of the URLs is using the CDR ID and the other the name of the term?
Thanks,
William
William Osei-Poku
NCI OCPL – Office of Communications & Public Liaison
Contractor: Publicis Sapient
Mobile: 240-506-5860
As discussed earlier, the software to refresh the glossary dictionary is leaving the value for the field "prettyUrlName" empty if the constructed name is longer than 75 characters. This is according to the original requirements when creating the glossary dictionary data set:
drug names that are 75 characters and under should use that name as their pretty URL
drug names that are 76 characters should be “empty”, resulting in a URL that uses the CDR ID
The URL to use for a term with a blank prettyUrlName is identical to the URL with the name, so the following link
https://www.cancer.gov/publications/dictionaries/cancer-terms/def/bevacizumab
would become
https://www.cancer.gov/publications/dictionaries/cancer-terms/def/46115
or for the Spanish version
https://www.cancer.gov/espanol/publicaciones/diccionarios/diccionario-cancer/def/46115
I thought Paul was suggesting to modify the dictionary export so that we populate the prettyUrlName value with the CDR-ID instead of an empty string. That would likely work without any additional modifications but it doesn't seem to be the cleanest solution. However, Paul is also talking about "the app" vs "the api" and his app should be handed a clean URL, so the api should handle the case of an empty prettyUrlName. Since I don't know where the api ends and the app starts I would have to ask ~sunvw to coordinate or point me to the next person to talk to.
At this point I believe this ticket needs the "WCMS Dependencies" tag.
A Github ticket has been entered for this bug:
The related ticket in github to fix this language toggle issue has been marked as completed today.
This appears to have been fixed as part of last night's upgrade to Drupal 9.5.9.
Yes, the toggle is working now for both languages.
Verified on Cancer.gov. Thanks!
Elapsed: 0:00:00.002088