Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

#6176 closed defect (bug) (fixed)

Cannot save 'register' and 'activate' pages when sign-ups are off

Reported by: johnjamesjacoby Owned by:
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.2
Component: Registration Keywords: has-patch
Cc:

Description (last modified by johnjamesjacoby)

If user sign-ups are turned off, the UI for saving Register and Activate pages exists, but their values do not save, nor do the pages themselves render as part of theme compatibility.

I haven't checked this configuration in a while, but this seems like a regression to me, like it used to work differently.

If sign-ups were once turned on and a page was created and assigned, and then later sign-ups are turned off, that page and association still exist, and we should show a "Sorry, sign-ups are currently disabled" type message instead of a page.

We could also hide the page assignment UI if bp_get_signup_allowed() returns false, but that leaves options in the database with no ability to modify them. Users should be able to modify slugs & page-assignments for these two pages, and they should never not act like sign-up and activation pages when they are assigned.

Attachments (1)

6176.01.patch (1.7 KB) - added by r-a-y 5 years ago.

Download all attachments as: .zip

Change History (16)

#1 @johnjamesjacoby
5 years ago

  • Component changed from Members to Sign ups & Activation

#2 @johnjamesjacoby
5 years ago

  • Description modified (diff)

#3 @hnla
5 years ago

I noticed this as well and thought it seemed buggy - registration was off, enabling it allowed me to select the pages correctly in BP settings.

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


5 years ago

#5 @imath
5 years ago

I think it's due to [9177] and [9180]

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


5 years ago

#7 @r-a-y
5 years ago

  • Keywords has-patch added; 2nd-opinion needs-patch removed
  • Version set to 2.2

01.patch removes the "Registration" pages dropdown when registration is disabled.

Instead of using bp_get_signup_allowed(), we can simply use bp_get_option( 'users_can_register' ) as multisite filters this DB option:
https://core.trac.wordpress.org/browser/tags/4.1/src/wp-includes/ms-functions.php#L2058

Here's a screenie of single-site when registration is disabled:
http://i.imgur.com/EpC2ihK.png

I think this is more user-friendly and makes more sense.

Last edited 5 years ago by r-a-y (previous) (diff)

@r-a-y
5 years ago

#8 @imath
5 years ago

Hi r-a-y thanks for your patch, i'm not sure we should be that much restrictive for these two pages.
When working on #6197, i've realized that at least on multisite WordPress was displaying the wp-signup page even If signups were not allowed. And we are actually redirecting this page to the register page id If it exists and defaults to an arbitrary slug "register" which leads in this case to a 404.
There are also plugins like invite anyone for instance that temporarly needs these pages to create an invited user.
So we should, imho, If we are to not allow the admin to set these pages, at least provide a filter to let plugins bring them back and stop redirecting If the register page is not set.

#9 @r-a-y
5 years ago

i've realized that at least on multisite WordPress was displaying the wp-signup page even If signups were not allowed. And we are actually redirecting this page to the register page id If it exists and defaults to an arbitrary slug "register" which leads in this case to a 404.

Good catch, imath.

Forgot about the wp-signup.php redirect to /register/. Is there a valid reason why we do this redirect? I just disabled registration on a multisite install and removed the wp-signup.php redirect and wp-signup.php shows a "Registration has been disabled" message. I think this is good enough.

There are also plugins like invite anyone for instance that temporarly needs these pages to create an invited user.

Also didn't know about Invite Anyone needing to have the Register page even when registration is disabled. I haven't tested Invite Anyone yet, but if this is the case, then 01.patch cannot be considered.

#10 @boonebgorges
5 years ago

I wouldn't worry about Invite Anyone for this piece of UI. If I need to update that plugin to account for upstream changes, I'll do so. It would be fine for IA to include some text to the effect of "You must enable registration temporarily in order to ensure that Register and Activate pages have been created". In other words, as far as I'm concerned, do what works for BP itself.

#11 @imath
5 years ago

In 9478:

Make sure Site admins can set the "register" and "activate" pages in the pages association settings screen even if signups are not allowed

In 2.2, when signups are not allowed, it is not possible to associate a WordPress page to the register or the activate specific components. It introduced some confusion for some site admins and had an impact on plugins allowing users to invite others.

We will keep on working on the best way to deal with these directory pages in the next release. In the meantime, we are bringing back the possibility to always set the association for the register and the activate specific components.

props boonebgorges

See #6176
Fixes #6197 (trunk)

#12 @imath
5 years ago

In 9479:

Make sure Site admins can set the "register" and "activate" pages in the pages association settings screen even if signups are not allowed

In 2.2, when signups are not allowed, it is not possible to associate a WordPress page to the register or the activate specific components. It introduced some confusion for some site admins and had an impact on plugins allowing users to invite others.

We will keep on working on the best way to deal with these directory pages in the next release. In the meantime, we are bringing back the possibility to always set the association for the register and the activate specific components.

props boonebgorges

See #6176
Fixes #6197 (branch 2.2)

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


5 years ago

#14 @DJPaul
5 years ago

Does anyone know why this ticket is still open? It looks like it was mostly finished in terms of immediate fixes.

#15 @johnjamesjacoby
5 years ago

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

Maybe waiting on confirmation that it's fixed?

If so, it appears to be.

Note: See TracTickets for help on using tickets.