• Resolved kontur

    (@kontur)


    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kontur

    (@kontur)

    Also in the frontend developer console:

    Uncaught 
    Object { description: undefined, fileName: "https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js", lineNumber: 27, message: "Missing helper: 'iff'", name: "Error", number: undefined, stack: "a@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js:27:1393\nd/<@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js:27:1793\nanonymous@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js line 28 > Function:5:86\nh@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js:27:7131\nc@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js:27:2327\nd/<@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js:27:2654\nanonymous@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js line 28 > Function:6:31\ne@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js:27:6660\nf@https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js:28:6394\ndisplayDynaOrderLists@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:4:9032\nprocessDynaOrderLists@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:4:3893\nparseAndPut@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:30154\nprocess/<@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:25078\nEventHandlerNonNull*loadHandlebarsLib@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:23440\nprocess@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:24538\nhandleData@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:8532\nsuccessHandler@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:14311\nrequest/l.onreadystatechange@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:12990\nEventHandlerNonNull*request@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:12909\nnextRequest@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:6949\nflushChain@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:6846\nparseInput@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:6423\ninit@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:3:3987\n@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:4:9688\n@https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.9/fastspring-builder.min.js?ver=1:4:10058\n" }
    handlebars.min.js:27:1582
    
    Thread Starter kontur

    (@kontur)

    Quite stupidly… the local and remote dev environments were running via http only; switched to https and it is working ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Blocks not rendering with JS error in admin’ is closed to new replies.