impress-org / donation-block-for-stripe

A beautiful donation form block for WordPress. Accept donations in minutes using Stripe.
7 stars 1 forks source link

Installing from within the editor should work smoothly #31

Closed mathetos closed 1 year ago

mathetos commented 2 years ago

When you install the block from within the block editor you get a fata error message and can't use the block.

Instead, when installing this way, the block should immediately be available. install-donation-form-block

mathetos commented 2 years ago

I enabled WP_DEBUG and got a slightly different error: image

Then in debug.log I see two issues that are most likely related:

PHP Notice:  Trying to get property 'livePublishableKey' of non-object in C:\Users\reach\Local Sites\750words\app\public\wp-content\plugins\donation-block-for-stripe-by-givewp\src\DonationBlock.php on line 54
PHP Notice:  Trying to get property 'testPublishableKey' of non-object in C:\Users\reach\Local Sites\750words\app\public\wp-content\plugins\donation-block-for-stripe-by-givewp\src\DonationBlock.php on line 56
DevinWalker commented 2 years ago

Hmm, I actually fixed those noticed in the repo version. I'm assuming you're using WP.org to download, which does have the PHP notices but shouldn't be causing what you're seeing. If you have time let's hop on a call soon to review.

DevinWalker commented 2 years ago

I found this JS error occurs on fresh install from the WP.org plugin directory: 2022-04-05_13-40-23

I believe I've already fixed this, just need to test it out to make sure.

DevinWalker commented 2 years ago

I'm seeing a different error now that we've released 1.0.3: 2022-04-07_11-34-01

Digging into the error more it points to:

2022-04-07_11-34-17

Which I believe, in the uncompiled version, has to do with these lines: 2022-04-07_11-35-16

DevinWalker commented 1 year ago

Gutenberg releases since this was posted have fixed this issue.