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 http://gron.test/wp-content/plugins/fastspring/dist/blocks.build.js?ver=1:1 ct http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 os http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ur http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ir http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Dr http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Pr http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 unstable_runWithPriority http://gron.test/wp-includes/js/dist/vendor/react.min.js?ver=17.0.1:9 xn http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 _n http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ua http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 pe http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ye http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ke http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 er http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Vr http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ur http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ir http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Dr http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Pr http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 unstable_runWithPriority http://gron.test/wp-includes/js/dist/vendor/react.min.js?ver=17.0.1:9 xn http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Nn http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 _n http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ua http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 pe http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ye http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 Ke http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 qe http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 pl http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 _reactRootContainer http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ml http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 render http://gron.test/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9 ha http://gron.test/wp-includes/js/dist/edit-post.min.js?ver=51ebcd5cd745a9866ab9a430d8318189:7 _wpLoadBlockEditor http://gron.test/wp-admin/post.php?post=99&action=edit:2526 n http://gron.test/wp-includes/js/dist/dom-ready.min.js?ver=d996b53411d1533a84951212ab6ac4ff:2 _wpLoadBlockEditor http://gron.test/wp-admin/post.php?post=99&action=edit:2525 <anonymous> http://gron.test/wp-admin/post.php?post=99&action=edit:2524 <anonymous> http://gron.test/wp-admin/post.php?post=99&action=edit:2529 react-dom.min.js:9:64017In 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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://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: http://gron.test/wp-admin/post.php?post=99&action=editNot 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.