Opened 10 years ago
Closed 9 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 )
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)
Change History (16)
This ticket was mentioned in Slack in #buddypress by hnla. View the logs.
10 years ago
This ticket was mentioned in Slack in #buddypress by jjj. View the logs.
10 years ago
#7
@
10 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:
I think this is more user-friendly and makes more sense.
#8
@
10 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
@
10 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
@
10 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.
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.