xwp / stream

🗄️ Stream plugin for WordPress
https://wordpress.org/plugins/stream/
GNU General Public License v2.0
408 stars 116 forks source link

Action links on BuddyPress logs are incorrect on multisite #1520

Open tharsheblows opened 1 month ago

tharsheblows commented 1 month ago

Bug Report

The action links on BuddyPress log entries do not link to the correct site on the Network Stream log.

Expected Behavior

They should link to the correct site.

Actual Behavior

They link to the site the network is on.

Steps to Reproduce the Problem

  1. Create two sites in multisite
  2. Network activate Stream
  3. Enable BuddyPress on both
  4. Go to the Network Stream log and look at the action links under the "Summary" in each entry. They will be incorrect for any entries who are not from the network domain.

Screenshots

(Testy Site url is stream.wpenv.net/testy)

Screenshot 2024-07-24 at 13 20 45
tharsheblows commented 1 month ago

There are various ways Stream and BuddyPress can be activated in a multisite.

BuddyPress

These are outlined here.

(nb: I know the last two are obvious but they're needed for record keeping 😊)

Stream

For Stream, testing the network admin logs as well as the individual site logs is be enough.

So let's test these scenarios:

Note regarding the tests above: if you are viewing the Stream logs as an admin of a site in a multisite and are not a super admin, you can't edit BuddyPress so the action links will not be shown.

The BuddyPress connector won't add links if the functions used to generate them aren't available (see https://github.com/xwp/stream/pull/1517 ) so in the network admin area, if BuddyPress is not network activated, the expectation is that there won't be action links before the log entries. This is acceptable.