[buddypress-trac] [BuddyPress Trac] #8474: The WordPress Full Site Editing feature & BuddyPress (and possibly some other plugins), who needs to adapt to the other one?

buddypress-trac noreply at wordpress.org
Wed May 12 21:54:00 UTC 2021

#8474: The WordPress Full Site Editing feature & BuddyPress (and possibly some
other plugins), who needs to adapt to the other one?
 Reporter:  imath         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  high          |  Milestone:  Up Next
Component:  Core          |    Version:
 Severity:  critical      |   Keywords:  dev-feedback

 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 [https://wordpress.org/plugins/gutenberg/ Gutenberg
 plugin], and the [https://wordpress.org/themes/tt1-blocks/ 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
 [https://themes.trac.wordpress.org/browser/tt1-blocks/0.4.5/index.php this
 page] if you are an admin.


 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

 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
 [https://wordpress.slack.com/archives/C02RQBYUG/p1620848510463100 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

 PS: the [https://plugins.trac.wordpress.org/browser/gutenberg/trunk/lib
 /template-canvas.php Gutenberg template canvas] should be the `index.php`
 template file of the theme to at least fix the first issue (and avoid the
 WSOD) 😉

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8474>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list