Skip to:
Content

BuddyPress.org

Opened 3 months ago

Last modified 10 days ago

#8474 new defect (bug)

The WordPress Full Site Editing feature & BuddyPress (and possibly some other plugins), who needs to adapt to the other one?

Reported by: imath Owned by:
Milestone: 10.0.0 Priority: high
Severity: critical Version:
Component: Core Keywords: dev-feedback
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:

  1. 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 👌)
  2. 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 😱.
  3. 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) 😉

Change History (1)

#1 @imath
10 days ago

  • Milestone changed from Up Next to 10.0.0

Let's try to progress on it during 10.0.0 dev cycle.

Note: See TracTickets for help on using tickets.