Widget not showing; javascript errors
-
I recently noticed that the widget is intermittently not showing (plugin version 1.2.13). I can’t find a clear pattern to reproduce it reliably, other than “it often fails on first page load in a new session but shows up on subsequent visits”. I see this on two different sites, one that has the pro add-on, and one that does not. Neither site uses any CSS or JS optimization plugin.
Looking at the Javascript console, I see the following. First, there is a warning (embedded in the page, probably by a PHP script from woocommerce):
(index): Scripts that have a dependency on [wc-blocks-checkout] must be loaded in the footer, wp-loyalty-rules-lite-main was registered to load in the header, but has been switched to load in the footer instead. See https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/5059
Second, there is an actual JS error. This is no doubt related to the issue, because this error doesn’t show when the widget does load correctly.
Error: Minified React error #299; visit https://reactjs.org/docs/error-decoder.html?invariant=299 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at t.createRoot (bundle.js?ver=1.2.13&t=1723441912:2:142694)
at bundle.js?ver=1.2.13&t=1723441912:2:226205The “bundle.js” mentioned above comes from wployalty/Js/dist/bundle.js so this is definitely related to wployalty plugin.
- You must be logged in to reply to this topic.