Blocks not rendering with JS error in admin
-
Hello,
I’ve just set up a Fastspring demo account to test a single page buy button with this plugin. Both on a local development setup and a remote test site (added to the whitelist) I am seeing the same error. I’m on WP 6.0.2 and I’ve tested with the https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js library (and also with 0.8.6 after fresh install of the plugin).
In the admin, adding a “FastSpring Product Catalog” works, but blocks like “FastSpring Buy Buttons” or “FastSpring Checkout Button” give me this error in the admin in the developer console (Firefox 104.0.1):
TypeError: window.prods[Object.keys(...)[0]] is undefined edit https://gron.test/wp-content/plugins/fastspring/dist/blocks.build.js?ver=1:1 ct https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 os https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ur https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ir https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Dr https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Pr https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 unstable_runWithPriority https://gron.test/wp-includes/js/dist/vendor/react.min.js?ver=17.0.1:9 xn https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 _n https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ua https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 pe https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ye https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ke https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 er https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Vr https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ur https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ir https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Dr https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Pr https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 unstable_runWithPriority https://gron.test/wp-includes/js/dist/vendor/react.min.js?ver=17.0.1:9 xn https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 _n https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ua https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 pe https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ye https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ke https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 pl https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 _reactRootContainer https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ml https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 render https://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ha https://gron.test/wp-includes/js/dist/edit-post.min.js?ver=51ebcd5cd745a9866ab9a430d8318189:7 _wpLoadBlockEditor https://gron.test/wp-admin/post.php?post=99&action=edit:2526 n https://gron.test/wp-includes/js/dist/dom-ready.min.js?ver=d996b53411d1533a84951212ab6ac4ff:2 _wpLoadBlockEditor https://gron.test/wp-admin/post.php?post=99&action=edit:2525 <anonymous> https://gron.test/wp-admin/post.php?post=99&action=edit:2524 <anonymous> https://gron.test/wp-admin/post.php?post=99&action=edit:2529 react-dom.min.js:9:64017
In the Gutenberg editor it simply says: “This block has encountered an error and cannot be previewed.” In the frontend, nothing renders.
In my PHP error logs I get these, presumably as a result of the block trying to render stuff it couldn’t properly save in the admin:
[Tue Sep 06 15:46:36.643586 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 397, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643703 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 397, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643710 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 398, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643715 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 398, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643725 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 406, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643729 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 406, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643733 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 407, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643737 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 407, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643757 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "PPProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 516, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643762 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "PPProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 519, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643766 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "PPProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 521, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643770 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "PPProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 522, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643774 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "PPProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 522, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643805 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 397, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643810 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 397, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643814 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 398, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643818 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 398, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643822 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 406, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643825 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 406, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643829 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 407, referer: https://gron.test/wp-admin/post.php?post=99&action=edit [Tue Sep 06 15:46:36.643832 2022] [php:warn] [pid 72411] [client 127.0.0.1:59514] PHP Warning: Undefined array key "BuyButtonProduct" in /Users/johannes/Projects/gron/dev/wp-content/plugins/fastspring/includes/fastspring_init.php on line 407, referer: https://gron.test/wp-admin/post.php?post=99&action=edit
Not off to a great start… any suggestions on what to debug or where this error is originating from?
-Johannes
- The topic ‘Blocks not rendering with JS error in admin’ is closed to new replies.