- AuthorPosts
- July 29, 2020 at 11:52 am #25463MartinGuest
Hi BoldGrid Team,
when do development work on my dev site, I get errors in the FF browser console, this should be fixed.
Uncaught TypeError: document.getElementById(…) is null
https://dev. [redacted] .com/wp-admin/admin-ajax.php?action=w3tc_monitoring_score&c95744bd40648fc8fd80a8f9d9e8cc44:1
admin-ajax.php:1:10
https://dev. [redacted] .com/wp-admin/admin-ajax.php?action=w3tc_monitoring_score&c95744bd40648fc8fd80a8f9d9e8cc44:1document.getElementById(“w3tc_monitoring_score”).innerHTML = “n/a”;
Best Regards,Martin
July 29, 2020 at 11:58 am #25465Jesse OwensKeymasterHello Martin-
Thank you very much for the report. Can you outline the replication steps for this error? For example, which page you’re on and which actions you’re taking when the errors show up?
Does this only occur on your dev site, or does it occur on your production site as well?
July 30, 2020 at 11:07 am #25474MartinGuestHello Jesse,
I have two sites, one dev, one live. Using Divi as builder. The issue occurs only on dev when I do development AND the Visual Builder is enabled. Now, I totally agree that this is a minor thing, but it hurts me getting an unneccesary error message.
My strong believe is, that the ID (element) is not present while running the Visual Builder and therefore no assigment can be done – causing an error when you do so when running the Visual Builder.
The proposal therfore is to either do a validity check for ‘document.getElementById(“w3tc_monitoring_score”)’
or ensure that all elements of the documents are ready like with
$(document).ready(
function()
{
document.getElementById(“w3tc_monitoring_score”).innerHTML = value;
}
);
Best Regards,
MartinJuly 30, 2020 at 3:13 pm #25480Jesse OwensKeymasterThanks so much for the additional info, Martin.
I’ve submitted a bug report for the developers to resolve this error. In the meantime, you can stop the warnings on your dev site by disabling the option to Show page rating in admin bar in your Performance > General Settings > Miscellaneous section:
- AuthorPosts
- The topic ‘Uncaught TypeError (w3tc)’ is closed to new replies.