cdts-sgdc
cdts-sgdc copied to clipboard
subTheme "esdc" - wb-auto duplicate ids
When using "subTheme": "esdc", we are getting error :
IDs of active elements must be unique: Document has active elements with the same id attribute: wb-auto-26 IDs of active elements must be unique: Document has active elements with the same id attribute: wb-auto-27 IDs of active elements must be unique: Document has active elements with the same id attribute: wb-auto-28
Happens in "About government" menu
I think this causes the exitscript to stop initializing when using this subTheme
Hello, can you paste the page source code here?
On my end, I don't see the error when just using the "subTheme": "esdc". Here is our sample page: https://cdts.service.canada.ca/app/cls/WET/gcintranet/v5_0_0/cdts/samples/subtheme-en.html
We use C# to configure the different CDTS options but this is what is rendered on the html page:
data-cdts-setup={
"cdnEnv": "esdcprod",
"base": {
"subTheme": "esdc",
"exitSecureSite": {
"exitScript": true,
"displayModal": true,
"exitURL": "",
"exitMsg": "Continuing to the selected site will abondon your session and any information provided will be lost. Do you wish to continue?",
"exitDomains": "javascript",
"displayModalForNewWindow": false
}
},
"top": {
"subTheme": "esdc",
"intranetTitle": [
{
"boldText": "ESDC/SC",
"href": "http://esdc.prv/en/index.shtml",
"text": "IntraWeb",
"acronym": "Employment and Social Development Canada / Service Canada"
}
],
"search": false,
"lngLinks": [
{
"href": "http://localhost/ihst4/Questionnaire.aspx?sid=613965cc-3623-42da-bb90-492eae01efc5\\u0026lc=fra\\u0026iffsappid=SIRF-IFFS\\u0026iffssid=1d8c95d4-2956-40d2-96cb-af619fc51802\\u0026GocTemplateCulture=fr-CA",
"lang": "fr",
"text": "Français"
}
],
"breadcrumbs": [
{
"href": "http://localhost/ihst4/#",
"title": "IFFS",
"acronym": "Interactive Fact Finding Service"
},
{
"title": "Development - DEV061"
}
],
"topSecMenu": false,
"siteMenu": true
},
"preFooter": {
"dateModified": "2023-11-27",
"showFeedback": {},
"showShare": false
},
"footer": {
"subTheme": "esdc",
"showFooter": true,
"contactLinks": []
},
"onCDTSPageFinalized": [
"\\u003cscript type=\\u0022text/javascript\\u0022 src=\\u0022resx/js/jquery.iffsutils.js\\u0022 defer=\\u0022defer\\u0022\\u003e\\u003c/script\\u003e",
"\\u003cscript type=\\u0022text/javascript\\u0022 src=\\u0022resx/js/popToTextbox.js\\u0022 defer\\u003e\\u003c/script\\u003e",
"\\u003cscript type=\\u0022text/javascript\\u0022 src=\\u0022resx/js/toggleByValue.js\\u0022 defer\\u003e\\u003c/script\\u003e",
"\\u003cscript type=\\u0022text/javascript\\u0022 src=\\u0022resx/js/optionGroup.js\\u0022 defer\\u003e\\u003c/script\\u003e"
]
}
I used your configuration and the page loads without any error. Can you send me the HTML code (View Page Source)?
Or you can check on your end where wb-auto-26, wb-auto-27 and wb-auto-28 appear multiple times.
I've noticed that this happens in Edge and Chrome but not in Firefox.
Also, it seems this may have an incidence on the exit script. In Edge and Chrome, the exit script is not initialized on all links in the main menu (wb-sm).
wb-auto-26
1- in the mobile menu (which is not active)
2- in the footer
wb-auto-27 is the Canada.ca link in mobile menu (which is not active) and footer wb-auto-28 is the Terms and conditions link in the mobile menu (which is not active) and footer
In Edge, in the Issue panel, this is what I see:
I'm guessing you have a WET component on the page that isn't being initialized properly (those wb ids come from WET).
I can't say much because I'm unable to reproduce the error on any browser. If you could send the page source code (right click + View Page Source), I'd be able to run the page on my end and check further.