Skip to:
Content

BuddyPress.org

#8908 closed defect (bug) (fixed)

Do not neutralize `BP_Component::parse_query()` when BP Rewrites are not in use

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version:
Component: Route Parser Keywords: has-patch
Cc:

Description

Even if we were not using it until 12.0, only using BP_Component::parse_query() when BP Rewrites can generate issues with plugins which were using WP Rewrites to build their URLs. For example, the BP Attachments plugin does.

To prevent resetting BP URI globals another time when the Legacy URL parser is used (having the BP Classic plugin active), we need to neutralize each children component's parse_query() methods.

Relative to #4954

Change History (2)

This ticket was mentioned in PR #109 on buddypress/buddypress by @imath.


17 months ago
#1

  • Keywords has-patch added; needs-patch removed

Make sure BP_Component::parse_query() always run. Only running when BP Rewrites are on is not the right way to go as some plugins might have been using WP Rewrites API for a while and might be extending this method from their component's class.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8908

#2 @imath
17 months ago

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

In 13492:

Make sure BP_Component::parse_query() always run

Only running it when BP Rewrites are on is not the right way to go as some plugins might have been using the WP Rewrites API for a while and might have extended this method from their component's class.

Instead of only running this method if BP Rewrites are on, we're adding a URL parser check inside each component having a directory to figure out whether it's needed to set BP URI globals.

See #4954
Fixes #8908
Closes https://github.com/buddypress/buddypress/pull/109

Note: See TracTickets for help on using tickets.