You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've noticed that during our testing, and this only applies while navigating from the breadcrumb trail, a message in the console begins to appear as follows. I've scanned our entire site of 5000 plus files and 'wb-auto' is not being used.
This error message starts to appear from v.15.3.0 and up - with the removal of the Share This code. v15.2.2 is the last version that worked for us. We've tested with Edge and Chrome and the message appears in both.
We are currently on v.14.6.0 and I tested all versions including the latest.
Error
wb.getId: ID 'wb-auto-6' isn't supposed to be hardcoded in the page. Please remove it or change its prefix to something different than 'wb-auto-'
The logic triggering the console error basically checks if any wb-auto-* IDs already exist in the DOM the very first time WET's .getId() method is called. If it finds anything, it complains and tries recovering.
The point is to avoid ID conflicts and discourage anyone from deliberately hardcoding those IDs into static pages.
Based on the OP's screenshot, this issue seems to affect CNSC's site (but can't be seen in action since it's currently on GCWeb 15.2.2 + WET 4.0.81):
Looks like that site uses WET + Gatsby/React.js.
I suspect what's happening is that when navigating between pages, React.js is keeping certain parts of the previous page's DOM "as-is" and WET's JavaScript is getting reloaded from scratch. End result is that WET thinks it's being loaded for the first time, detects old auto IDs in the "polluted" DOM carried-over from a previous page, then freaks out (as it should).
IMO this isn't a WET bug. The logic is detecting and trying to recover from an issue that has always existed. Although the console error might be overkill in this case...
Maybe there'd be value in making the console error only appear if React.js doesn't exist in the page? As for the recovery logic, IMO it should always run no matter what.
Describe the bug
We've noticed that during our testing, and this only applies while navigating from the breadcrumb trail, a message in the console begins to appear as follows. I've scanned our entire site of 5000 plus files and 'wb-auto' is not being used.
This error message starts to appear from v.15.3.0 and up - with the removal of the Share This code. v15.2.2 is the last version that worked for us. We've tested with Edge and Chrome and the message appears in both.
We are currently on v.14.6.0 and I tested all versions including the latest.
Error
wb.getId: ID 'wb-auto-6' isn't supposed to be hardcoded in the page. Please remove it or change its prefix to something different than 'wb-auto-'
(anonymous) @ wet-boew.min.js:8
getId @ wet-boew.min.js:8
(anonymous) @ theme.min.js:7
(anonymous) @ theme.min.js:7
Update
The 'wb-auto-8' is accompanying the GCWeb menu.
To Reproduce
Steps to reproduce the behaviour:
Current behaviour
When navigating the site using the breadcrumbs the error begins to display in the console.
Expected behaviour
Any version before 15.3.0 does not generate this error.
Screenshots and/or logs
Desktop (please complete the following information):
Additional context
We were able to generate this error from our localhost and our development server (Azure app service/Windows.NET).
The text was updated successfully, but these errors were encountered: