#2101 closed defect (fixed)
JavaScript error on login page
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | minor | Milestone: | BASE 3.11.2 |
Component: | web | Version: | |
Keywords: | Cc: |
Description
The error log shows the following on the login page:
TypeError: element is null Data</data.get@http://127.0.0.1:9080/base-2097/include/scripts/main-2.js?v=3.12.0:866:7 TextOverflow</overflow.getOverflowMethod@http://127.0.0.1:9080/base-2097/include/scripts/main-2.js?v=3.12.0:4698:10 TextOverflow</internal.initCheck@http://127.0.0.1:9080/base-2097/include/scripts/main-2.js?v=3.12.0:4780:7 Doc</internal.invokeFinalizers@http://127.0.0.1:9080/base-2097/include/scripts/main-2.js?v=3.12.0:630:5 Doc</internal.initDocument@http://127.0.0.1:9080/base-2097/include/scripts/main-2.js?v=3.12.0:543:3
and
TypeError: element is null main-2.js:866:7 Data</data.get http://127.0.0.1:9080/base-2097/include/scripts/main-2.js:866:7 App</internal.initApp http://127.0.0.1:9080/base-2097/include/scripts/main-2.js:245:10
Doesn't seem to affect functionality.
Change History (3)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [7421]) Fixes #2101: JavaScript error on login page
comment:3 by , 7 years ago
(In [7423]) Fixes #2101: Content security policy violations should not be reported to the server
Reportering CSP violations must now be configured in the web.xml file. Two actions are needed:
- Add a
report-uri
statement to the Content-Security-Policy header. - Enable the
csp-report
servlet.
Version 0, edited 7 years ago by (next)
Note:
See TracTickets
for help on using tickets.
Hmmm... it seems like the source of the error is the footnote frame. For some reason a
DOMContentLoaded
event is fired but thedocument.body
element is null.The problem seems also to be related to the AdBlock plugin. If the plug-in is disabled the errors go away.
Additional investigations indicate that the problem is also related to the
location.reload()
call from the login page. The reload is there so that the footnote page is updated if a user logs out (since it may contain personal data). Skipping the reload or delaying it for a second also seems to get rid of the problem. Could it be that the call tolocation.reload()
triggers a prematureDOMContentLoaded
event before the DOM is actually loaded? It could be that AdBlock is causing the DOM to take longer to load?So, I think we should add a short delay before reloading the footnote page and that we should check the
document.body
before trying to use it.