Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 8 years ago

#6371 closed defect (bug) (fixed)

Manage Signups on Network Admin dashboard returns Blog Admin URL, not Network Admin URL

Reported by: dshaw002's profile dshaw002 Owned by: imath's profile imath
Milestone: 2.5 Priority: high
Severity: normal Version: 2.2.2
Component: Administration Keywords: has-patch commit
Cc: brajesh@…

Description

I have BuddyPress Network Activated and BP_ENABLE_MULTIBLOG set to true.

The Manage Signups page is on the BP_Network page (it's the only real Buddypress Network Admin Page). Because bp_is_network_activated removed the network_admin_url however (because it is bp_is_network_activated() AND bp_multiblog_mode() ), it returns the blog admin url and not network_admin_url. This gives permission errors because the system thinks you are trying to edit a user from the blog and not network level.

Could we have adjustment for manage signups on network admin page? Or is there a better solution to this issue?

Attachments (3)

6371.01.patch (1.4 KB) - added by r-a-y 9 years ago.
6371.02.patch (5.2 KB) - added by imath 8 years ago.
6371.03.patch (5.2 KB) - added by imath 8 years ago.

Download all attachments as: .zip

Change History (22)

#1 @netsurfaces
9 years ago

  • Priority changed from normal to high

I came here to report the same thing.

WordPress 4.2 (multisite)
BuddyPress 2.2.3.1

When BP_ENABLE_MULTIBLOG is set to TRUE in wp-config the links on /wp-admin/network/users.php?page=bp-signups are missing the "/network".

They go to: /wp-admin/users.php?page=bp-signups&signup_id=1&action=resend

Which gives a "You do not have sufficient permissions to access this page."

They should go to /wp-admin/network/users.php?page=bp-signups&signup_id=1&action=resend

Thanks!

#2 @r-a-y
9 years ago

Confirmed.

The problem looks like it is an issue with bp_get_admin_url() relying on bp_core_do_network_admin().

bp_core_do_network_admin() returns false when BP_ENABLE_MULTIBLOG is true.

I've attached a temporary fix, but will probably need a better solution.

@r-a-y
9 years ago

#3 @r-a-y
9 years ago

  • Keywords has-patch added

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


9 years ago

#5 @r-a-y
9 years ago

  • Milestone changed from 2.3 to 2.4

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


9 years ago

#7 @DJPaul
9 years ago

In the current behaviour, I'm not sure why would we want to disable network admin links if is_multisite() and is_multiblog()? Whole business seems like a confusing undocumented mess.

#8 @DJPaul
9 years ago

I can't test this patch so I don't want to commit it, but if it is the best way to resolve the problem for 2.4, go for it.

#9 @DJPaul
9 years ago

  • Milestone changed from 2.4 to 2.5

Bumping to 2.5 due to lack of feedback and lack of time before 2.5. Perhaps we could include this in a 2.4.x release, also.

#10 follow-up: @imath
8 years ago

@r-a-y do you think this https://buddypress.trac.wordpress.org/ticket/6360#comment:13 would also fix this issue ?

#11 in reply to: ↑ 10 @DJPaul
8 years ago

Replying to imath:

@r-a-y do you think this https://buddypress.trac.wordpress.org/ticket/6360#comment:13 would also fix this issue ?

It doesn't; multiblog still needs some love. I decided to put the other change in for now while we look at this.

#12 @sbrajesh
8 years ago

What is the expected behaviour here? If BuddyPress is in Multiblog mode, It assumes that the things should be managed per site and not in the network admin.

If that is considered the correct behavior, the ticket #6657 fixes the permission issue.

#13 @sbrajesh
8 years ago

  • Cc brajesh@… added

#14 @imath
8 years ago

  • Keywords needs-testing added

@sbrajesh signups are not linked to a blog. So i think the correct behavior for multiblog is to manage signups at the network level. 6371.02.patch should fix the issue. I'll run some tests to see if it doesn't introduce any side effects on regular configs.

@imath
8 years ago

#15 @sbrajesh
8 years ago

@imath You are correct. I had forgotten that on Multisite, the users don't get a role when added via BuddyPress registration process whether it is multiblog mode or not does not matter.

#16 @imath
8 years ago

  • Keywords needs-testing removed

As promised, i've run some tests which led to 6371.03.patch.

Using this patch, everything seems to work as expected for:

  • regular config
  • Multisite / BuddyPress activated on the network
  • Multisite / BuddyPress activated on a child blog
  • Multisite / BuddyPress activated on the network and BP_ENABLE_MULTIBLOG set to true.

I think 03.patch is good to go!

@imath
8 years ago

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


8 years ago

#18 @imath
8 years ago

  • Keywords commit added

If no objections, i will commit 6371.03.patch this evening (6 or 7 hours from now).

#19 @imath
8 years ago

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

In 10456:

Make sure the Sign-ups Administration page is available when BuddyPress is "multiblog" activated.

On multisite configs, when the constant BP_ENABLE_MULTIBLOG is set to true, Sign-ups can be managed from the Users administration of the network.

Props r-a-y, sbrajesh

Fixes #6371

Note: See TracTickets for help on using tickets.