Opened 7 months ago
Last modified 14 hours ago
#8474 new defect (bug)
The WordPress Full Site Editing feature & BuddyPress
Reported by: | imath | Owned by: | |
---|---|---|---|
Milestone: | 10.0.0 | Priority: | high |
Severity: | critical | Version: | |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
Hi!
After reading this feedback about 8.0.0 missing support for Full Site Editing (FSE), I've checked it was actually the case... and IT IS!
If you activate the Gutenberg plugin, and the tt1-blocks theme, then go on any BuddyPress page, you'll get a blank page (remember the white screen of death, it looks like it) if you're not an admin or you'll get this page if you are an admin.
Reason:
The way FSE is overriding PHP templates loading consists of always using the gutenberg_dir_path() . 'lib/template-canvas.php'
before rendering FSE blocks. When our BP Theme Compat API receives this template, it doesn't find it into the Theme or child theme so it ends up with the index.php
template which is the only one available into the theme. I must say the message output by this index.php
template can be misleading in this case:
This theme was built for the WordPress experimental full-site-editing feature. You need to install and activate the Gutenberg plugin to make it work.
I can imagine the user wondering "The Gutenberg plugin is active, my theme supports FSE, what's going wrong?" Well, not really. As the linked feedback showed above: the user says BuddyPress does not support WordPress FSE 😬.
This is pretty concerning, it's not that it's not possible to edit BP Pages layout thanks to the very promising FSE feature, it's that BuddyPress content is not shown at all on front-end, in other words we can't use BuddyPress (and probably bbPress and some other plugins) with WordPress FSE feature at all.
So I've explored Gutenberg code to understand how we'd need to fix this:
- if the requested template is
gutenberg_dir_path() . 'lib/template-canvas.php'
then do not try to find it into the theme and simply return it unchanged. (not a big deal 👌) - We'd then need to stop resetting the post into our BP Theme Compat API, to be sure the FSE feature gets an existing post ID. (We've discussed about it during today's dev chat). (more of a big deal: how would BuddyPress plugins would behave if we'd change this?). I've found a workaround to fix it. But I must say I really don't feel comfortable with overriding the
core/post-content
block render callback 😱. - We'd finally need to take care of disabling the comments template as what we've put in place to disable it, is not working with the comments block.. but it's minor..
Who needs to adapt? Us, WordPress FSE? Thanks in advance for your opinions.
PS: the Gutenberg template canvas should be the index.php
template file of the theme to at least fix the first issue (and avoid the WSOD) 😉
Attachments (2)
Change History (10)
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
2 months ago
#3
@
5 weeks ago
- Keywords has-patch added; dev-feedback removed
Now that Twenty Twenty Two has been merged into WordPress 5.9-alpha, things are easier to test. 8474.patch brings BuddyPress into this theme and I believe all themes using the WordPress Full Site Editing feature.
If you try to go to any BuddyPress page having Twenty Twenty Two active without the patch, you'll get a blank page. Once you applied the patch, you'll get the BuddyPress content 🙌. See the screenshot below:
I'll commit the patch soon and leave this ticket open so we can use it to monitor WP 5.9 FSE progress.
#5
@
45 hours ago
Hi @imath,
I'm not sure this is the right ticket to raise an issue about Twenty Twenty-Two theme but I've seen you've mentioned this ticket in #8603 so that's why I'm here :)
I'm testing BuddyPress 10 Beta version on WordPress 5.9 Beta 2 with Twenty Twenty-Two theme and BuddyPress Nouveau template pack without an any block editor related plugin. I'm seeing BuddyPress pages (such as activities, groups, create groups) without an any issue but there is an issue in the group photo upload page. It looks like the screen page is not loading.
Am I missing something or this an issue?
#6
@
44 hours ago
Hi @oztaser, thanks a lot for your tests, I’ve seen something weird on the invites screen too. I was planning to give it a look. It’s probably an issue, I’ll look at it asap 👍
#7
@
14 hours ago
- Summary changed from The WordPress Full Site Editing feature & BuddyPress (and possibly some other plugins), who needs to adapt to the other one? to The WordPress Full Site Editing feature & BuddyPress
#8
@
14 hours ago
@oztaser I've tested and was able to upload the Group profile photo. But there's a weird issue when using MacOs and Twenty Twenty-one: underscore doesn't recognize the JS and operator &&
. It works using Windows..
So in 8474-group-invites.patch, I'm suggesting to stop using the &&
operator into the JS template. This patch also improves user feedback when invites are restricted to Admins or Mods.
Let's try to progress on it during 10.0.0 dev cycle.