hollowaysteve88
Forum Replies Created
-
Actually, I think the root cause of the issue may be coming from this snippet. This is the final few lines of bundle.js file:
var Z = document.getElementById(“wll-site-launcher”);
Z ? t.createRoot(Z).render(e.createElement(X, null)) : setTimeout((function() {
Z = document.getElementById(“wll-site-launcher”);
var n = t.createRoot(Z);
Z && n.render(e.createElement(X, null))
}
), 1e3)The above script attempts to create the widget via the ‘wll-site-launcher’ DOM element. But it may happen that the element is not yet created, so the script has a fallback where it defers this action by one second (1e3 milliseconds in the original code). On a slow site with a complex DOM (think elementor and lots of featured products on the home page), a one second delay is not enough, and the callback fails because the element it’s looking for is still not created. This is what I see in the error: the argument passed to createRoot() is in fact null.
I manually changed the timer to two seconds (2e3) and this seems to help on my sites, but this is not the right way to do it. The code should keep checking for null and re-defer itself until the DOM is ready. Perhaps do this up to 10 times, deferring another second each time, and then print an error message and fail gracefully. I’m not a JS developer so I can’t suggest anything better, sorry.
Regarding the [wc-blocks-checkout] warning, I’m not sure why it’s coming up on pages that have nothing to do with the checkout (e.g. the landing page). I do have a plugin that adds a side-cart widget which allows users to view their cart contents and proceed to checkout from the side cart pop-out.
Yes, the issue seems to be resolved.
@sigmakicks almost certainly the same issue since I was getting similar errors. If this is critical for your site and you know a bit of PHP, you can use the plugin file editor from the dashboard to comment out the Birthday-related snippets from the above file. But I’m guessing this will be fixed very soon.
Update: I don’t have any other plugins that use the PAnD library for those notices. But it turns out that I get a 403 error from admin-ajax.php when I try to dismiss the notice. This is almost certainly not your fault – you can probably close this thread.
Thanks for the suggestion! I have a lot of other plugins installed but I will experiment with this on a staging env and let you know. What open source library are you using for this?
@synergistmedia did you get this resolved?
Most likely this is because the plugin does not support the new “wooCommerce blocks” functionality. If you use the classic [woocommerce_checkout] block the plugin still works. See this link for details.