adventistchurch / alps-gutenberg-blocks

A Wordpress plugin to create Gutenberg plugins that work for ALPS.
4 stars 6 forks source link

Crashes WordPress 6.3 on php8 #106

Closed ccharacter closed 1 year ago

ccharacter commented 1 year ago

Hi there, I first noticed this issue a couple of months back, and verified that it's still a problem. Is anyone still monitoring this repo?

YauheniKapliarchuk commented 1 year ago

Hi @ccharacter, sorry for delay...

Could you please describe this issue with more details?

I would take it for investigation.

Thanks, Best Regards!

hans-olson commented 1 year ago

Are there more details?

ccharacter commented 1 year ago

Hi folks--I'll update my dev site and reinstall it so that I can hopefully provide more information. I do recall that there was surprisingly little in the logs. (May be a couple of hours until I can do that, but I'll try to do it today.)

ccharacter commented 1 year ago

So far I am unable to duplicate the behavior I complained about in August. Will try it on the live site shortly.

ccharacter commented 1 year ago

Yeah, so apparently I forgot that I had installed the Carbon Fields plugin to cut down on some other errors in ALPS. Without the Carbon Fields plugin installed and activated, the block editor crashes completely: white screen of death and this in the error log:

[26-Sep-2023 15:18:55 UTC] PHP Notice: Function register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>alps-gutenberg-blocks/latest-posts/tags</code> is missing the required <code>permission_callback</code> argument. For REST API routes that are intended to be public, use <code>__return_true</code> as the permission callback. Please see <a href="https://wordpress.org/documentation/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in /var/www/vhosts/communityservices.org/plum/pr0g/wp-includes/functions.php on line 5905 [26-Sep-2023 15:18:55 UTC] PHP Warning: Trying to access array offset on value of type bool in /var/www/vhosts/communityservices.org/plum/pr0g/wp-includes/block-editor.php on line 553

ccharacter commented 1 year ago

This is still the case if I deactivate ALL PLUGINS except ALPS Gutenberg Blocks: exact same errors.

If I activate a default theme like TwentyTwenty, the block editor works fine. (That's the only way I can actually deactivate ALPS Gutenberg Blocks, it turns out--won't let me while ALPS is active theme.)

It seems that the only way to have the block editor work (sans Carbon Fields) is to completely remove the ALPS Gutenberg Blocks plugin--by deleting the files from the system.

ccharacter commented 1 year ago

image

ccharacter commented 1 year ago

I'm using a child theme of ALPS 3 on the site. So I tried activating ALPS for Wordpress itself instead (still zero plugins active, other than ALPS Gutenberg Blocks). Same result: white screen of death for block editor, same error as above in log.

When I remove ALPS Gutenberg Blocks by deleting it from the file system, I still get the same result.

When I reactivate Carbon Fields, the block editor works in ALPS for WordPress--and in my child theme.

When I reinstall ALPS Gutenberg Blocks WITH CARBON FIELDS ACTIVE the block editor works.

I think that my conclusion at this point is that the problem is not in the ALPS Gutenberg Blocks plugin, but in the theme itself. And that Carbon Fields seems to provide a workable crutch.

hans-olson commented 1 year ago

You need to use ALPS CDN version 3.13.1. If you upgrade to ALPS 3.15.1.4 the new CSS is included and you should not have issues.

That theme is attached to this post.

alps-wordpress-v3.15.1.4.zip

YauheniKapliarchuk commented 1 year ago

Please use latest version of our theme.

@hans-olson will handle it.

Thanks, Best Regards!

ccharacter commented 1 year ago

So when did the theme fork? Or is there a reason why it wouldn't be auto-updating?

hans-olson commented 1 year ago

Hi Sharon,

It sounds like you might not be getting auto-updates. Please download the most recent version, by clicking herehttps://github.com/adventistchurch/alps-wordpress/releases/, and see if this fixes your issue. We have done some work recently to provide you with more reliable auto-updates.

Blessings,

Hans

From: Sharon Stromberg @.> Date: Tuesday, October 10, 2023 at 1:09 PM To: adventistchurch/alps-gutenberg-blocks @.> Cc: Hans Olson @.>, State change @.> Subject: [EXTERNAL] Re: [adventistchurch/alps-gutenberg-blocks] Crashes WordPress 6.3 on php8 (Issue #106)

So when did the theme fork? Or is there a reason why it wouldn't be auto-updating?

— Reply to this email directly, view it on GitHubhttps://github.com/adventistchurch/alps-gutenberg-blocks/issues/106#issuecomment-1755890660, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOVXDK7GRFX3LYZ72YK4NKLX6V6LRAVCNFSM6AAAAAA3QC6M32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVHA4TANRWGA. You are receiving this because you modified the open/close state.Message ID: @.***>

ccharacter commented 1 year ago

It looks like 3.15 requires PHP 8.1, which I am not presently running on the site in question. I'll be interested to see whether, when I update PHP, there is any indication that a new version of ALPS is available. You really should have some sort of notification--especially when the new version fixes this many problems! Also, you'll be hearing from me again if there are a significant number of PHP errors. I live in the error logs. . . LOL!

ccharacter commented 1 year ago

Huh. PHP 8.1 isn't even available on the NAD Cloud yet. So this doesn't do me a bit of good.

hans-olson commented 1 year ago

Hi Sharon,

Here is what we go by…https://www.php.net/supported-versions.php. PHP is 8.0 is one month away from ending Security Support, so a few weeks ago, we pushed the minimum version from 8.0 to 8.1.

Blessings,

Hans

From: Sharon Stromberg @.> Date: Tuesday, October 10, 2023 at 2:42 PM To: adventistchurch/alps-gutenberg-blocks @.> Cc: Hans Olson @.>, State change @.> Subject: [EXTERNAL] Re: [adventistchurch/alps-gutenberg-blocks] Crashes WordPress 6.3 on php8 (Issue #106)

Huh. PHP 8.1 isn't even available on the NAD Cloud yet. SMH. . .

— Reply to this email directly, view it on GitHubhttps://github.com/adventistchurch/alps-gutenberg-blocks/issues/106#issuecomment-1756025844, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOVXDK7WLGBW2YQ2N7A5L7TX6WJK5AVCNFSM6AAAAAA3QC6M32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWGAZDKOBUGQ. You are receiving this because you modified the open/close state.Message ID: @.***>

ccharacter commented 1 year ago

If you talk to anybody in NAD, please nudge them in the right direction. I don't always get a reply from them!

hans-olson commented 1 year ago

I’ve passed this along.

-Hans

From: Sharon Stromberg @.> Date: Tuesday, October 10, 2023 at 2:52 PM To: adventistchurch/alps-gutenberg-blocks @.> Cc: Hans Olson @.>, State change @.> Subject: [EXTERNAL] Re: [adventistchurch/alps-gutenberg-blocks] Crashes WordPress 6.3 on php8 (Issue #106)

If you talk to anybody in NAD, please nudge them in the right direction. I don't always get a reply from them!

— Reply to this email directly, view it on GitHubhttps://github.com/adventistchurch/alps-gutenberg-blocks/issues/106#issuecomment-1756046616, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOVXDK7JVD262M23OFAFUKDX6WKNDAVCNFSM6AAAAAA3QC6M32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJWGA2DMNRRGY. You are receiving this because you modified the open/close state.Message ID: @.***>