Skip to:
Content

Opened 15 months ago

Closed 6 months ago

#7502 closed defect (bug) (fixed)

Legacy forums do not work with WordPress 4.7

Reported by: r-a-y Owned by: johnjamesjacoby
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.7.1
Component: Forums Keywords: has-patch
Cc:

Description

WordPress 4.7 introduced the WP_Taxonomy class. BackPress also has a class called WP_Taxonomy.

But our legacy forum bridge code is throwing a fatal error because we are attempting to load the BackPress version of the WP_Taxonomy class when it already exists in WordPress 4.7 now. (Also both classes are entirely different, code-wise!)

Attached patch does a dirty workaround by doing the following:

  1. Copies the BackPress version of the WP_Taxonomy class and renames the class to BackPress_Taxonomy.
  2. Copies the bbPress (v1) version of the BB_Taxonomy class and extends it to use our custom BackPress_Taxonomy class instead of WP_Taxonomy.

Attachments (2)

7502.01.patch (88.2 KB) - added by r-a-y 15 months ago.
7502.02.patch (90.9 KB) - added by r-a-y 15 months ago.

Download all attachments as: .zip

Change History (12)

@r-a-y
15 months ago

@r-a-y
15 months ago

#1 @r-a-y
15 months ago

02.patch does the following:

  • Fixes the fatal error when using WP 4.7 (basically 01.patch)
  • Fixes issues with installing the old bbPress DB tables with utf8mb4 as of WP 4.2+
  • When installing the old bbPress DB tables, do not attempt to modify the wp_users DB table
  • Fixes the topic title not displaying in newer themes using document title in WP 4.4+
  • Adds a performance tweak when bp_get_forum_topic_posts() is used more than once on the same forum topic page
Last edited 15 months ago by r-a-y (previous) (diff)

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


14 months ago

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.


12 months ago

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.


11 months ago

#5 @DJPaul
11 months ago

  • Milestone changed from Awaiting Review to 3.0

This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.


7 months ago

#7 @DJPaul
7 months ago

In the above lined Slack mention, I had a chat with @boonebgorges and @johnjamesjacoby and @hnla. We decided to put this patch into 2.9.x, release that in January, and for 3.0, pull out all the bbPress 1.x legacy support / compatibility code.

As things stand, the Classic Forums component can be enabled and the config file is written, but the fatal error occurs whenever you try to access a group forum on the front-end (or enable it in a new group). This'll only work with WP pre-4.7, which is just over a year old.

This ticket was mentioned in Slack in #buddypress by boone. View the logs.


7 months ago

#9 @djpaul
7 months ago

In 11763:

Retire Legacy Forums.

"Legacy Forums" is what we now call the bundled version of bbPress 1 that has shipped with BuddyPress for over nine years. The Legacy Forums codebase/features are many years stagnant, and it has been almost completely hidden from the UI for the past five years.

Legacy Forums were replaced by bbPress 2, which is its own plugin, and we've been promoting its integration with BuddyPress for a long time. Most significantly, bbPress 1 only runs on WordPress versions older than 4.7, because of a BackPress conflict (which is nested inside bbPress 1) with WordPress 4.7's WP_Taxonomy class.

If your site is still using Legacy Forums, you will need to migrate to bbPress 2 to run BuddyPress 3.0. See https://bpdevel.wordpress.com/2017/12/07/legacy-forums-support-will-be/ for more information.

Fixes #5351
See #7502

#10 @djpaul
6 months ago

  • Resolution set to fixed
  • Status changed from new to closed

In 11771:

2.9 branch - fix Classic Forums compatibility with WordPress 4.7+.

  • Fixes the fatal error when using WP 4.7+.
  • Fixes issues with installing the old bbPress DB tables with utf8mb4, as of WP 4.2+.
  • When installing the old bbPress DB tables, do not attempt to modify the wp_users DB table.
  • Fixes the topic title not displaying in newer themes using document title in WP 4.4+.
  • Adds a performance tweak when bp_get_forum_topic_posts() is used more than once on the same forum topic page.

Props r-a-y

Fixes #7502

Note: See TracTickets for help on using tickets.