Site icon Hip-Hop Website Design and Development

Uncaught TypeError: Can not learn property ‘firstChild’ of null after upgrading to WordPress 5.5

I get the next error from comment-reply.min.js (which appears to be a WordPress file):

Uncaught TypeError: Can not learn property 'firstChild' of null
    at comment-reply.min.js?ver=026d5828124b6319675d89d24f212b97:2
    at Object.moveForm (comment-reply.min.js?ver=026d5828124b6319675d89d24f212b97:2)
    at HTMLAnchorElement.a (comment-reply.min.js?ver=026d5828124b6319675d89d24f212b97:2)

Is that this a identified difficulty after upgrading to WordPress 5.5 or ought to I begin debugging it?

What can be the easiest way to deal with it?

We have now not modified the feedback template however solely upgraded to the most recent model of WordPress.

The related a part of the template is:

<?php comment_id_fields($_GET["post_id"]); ?>
<?php do_action('comment_form', $_GET["post_id"]); ?>
            
<div class="fl-comment-form-cancel">
   <?php cancel_comment_reply_link(); ?>
</div>

After a fast examine, it appears it’s trying to find a component with the id wp-temp-form-div, which doesn’t exist.

And the difficulty appears to be right here:

, r = E(h.commentReplyTitleId)
, o = void 0 !== r ? r.firstChild.textContent : "";

If commentReplyTitleId doesn’t exist, r can be null, therefore totally different than undefined, so it tries to get the firstChild.


A fast workaround I am utilizing:

(operate () {
    var oldGet = doc.getElementById.bind(doc)
    doc.getElementById = operate (id) 
})();

However to me it looks like a bug in 5.5.