Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subTheme "esdc" - wb-auto duplicate ids #1080

Open
sonya-chenard opened this issue Jan 15, 2024 · 7 comments
Open

subTheme "esdc" - wb-auto duplicate ids #1080

sonya-chenard opened this issue Jan 15, 2024 · 7 comments

Comments

@sonya-chenard
Copy link

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

@ahmad-shahid
Copy link
Contributor

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

@sonya-chenard
Copy link
Author

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"
    ]
}

@ahmad-shahid
Copy link
Contributor

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.

@sonya-chenard
Copy link
Author

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

@sonya-chenard
Copy link
Author

wb-auto-26
1- in the mobile menu (which is not active)
image

2- in the footer
image

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

@sonya-chenard
Copy link
Author

In Edge, in the Issue panel, this is what I see:
image

@ahmad-shahid
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants