Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25463
    Martin
    Guest

    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:1

    document.getElementById(“w3tc_monitoring_score”).innerHTML = “n/a”;

    Best Regards,Martin

    #25465
    Jesse Owens
    Keymaster

    Hello 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?

    #25474
    Martin
    Guest

    Hello 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,
    Martin

    #25480
    Jesse Owens
    Keymaster

    Thanks 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:

    Disable show page rating in admin bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Uncaught TypeError (w3tc)’ is closed to new replies.