Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#6295 closed defect (bug) (worksforme)

New user activation link returns 404 error

Reported by: wrowlands's profile wrowlands Owned by:
Milestone: Priority: highest
Severity: critical Version: 2.2.1
Component: Members Keywords:
Cc:

Description

We just updated to BuddyPress version 2.2.1. In doing so we are now finding that the new user activation link returns a 404 error. This was the only plugin that we updated and then started to notice the errors from a number of new users attempting to sign up. I attempted to sign up as a new user while using an email that was not registered and received the same error. This is a critical problem that needs to be addressed soon.

Change History (24)

#2 follow-up: @johnjamesjacoby
10 years ago

Out of curiosity, can you try updating your permalink settings and try again? We did change the way activation links are formatted, but it should have been in a backwards compatible way.

Last edited 10 years ago by johnjamesjacoby (previous) (diff)

#3 follow-up: @DJPaul
10 years ago

@wrowlands I was going to sign up on site test to test the problem, but the domain is 403ing.

Last edited 10 years ago by DJPaul (previous) (diff)

#4 @hnla
10 years ago

Can't replicate the issue, tested with 4.1.1 /2.1.1

Signing up then activating account directly by clicking the email link url worked as expected.

Question has also been posed on WP support:
https://wordpress.org/support/topic/new-user-activation-link-returns-404-with-new-version-of-buddypress?replies=2#post-6691589

#5 in reply to: ↑ 2 @wrowlands
10 years ago

Replying to johnjamesjacoby:

Out of curiosity, can you try updating your permalink settings and try again? We did change the way activation links are formatted, but it should have been in a backwards compatible way.

John, since the code was changed, could you please provide me with the old code and let me know where it goes? I will edit my website with the older code and see if this clears the matter?

#6 in reply to: ↑ 3 @wrowlands
10 years ago

Replying to DJPaul:

@wrowlands I was going to sign up on site test to test the problem, but the domain is 403ing.

I will check with our host, GoDaddy, and find out why we are getting 403 errors. It appears that the newer version on BuddyPress is breaking the code for the site.

#7 @boonebgorges
10 years ago

wrowlands - What version of BP are you upgrading from? In one of the several threads you've started related to this issue, I think I read that you have skipped a few major versions. Is that correct? It will be difficult to tell you which "code was changed" without knowing the previous version. Depending on the previous version, it's probably possible for you, as a temporary measure, to simply delete the /buddypress/ directory and replace it with an older version, without worrying about database-level changes.

The fact that your site is now returning a 403 error makes me strongly suspect, like johnjamesjacoby, that this issue is related to permalinks. I'd suggest ensuring that your .htaccess file has permissions like 644 or something more open. Pasting the contents of that file here would also help with debugging.

A list of plugins/themes that you are running would also be helpful, as it's possible that this is due to a plugin/theme conflict.

#8 @wrowlands
10 years ago

I was using BuddyPress 2.1.1. Fortunately I have a backup of the plugin and I am now back to version 2.1.1 on the website. NOW everything works just fine. I spoke with GoDaddy about the 403 errors and they noticed the same thing before I reverted to BP 2.1.1. They told me that there was a php loop that was causing the issue. Now with BP 2.1.1, we are not seeing 403 errors. I am also able to set up a new user without any issues. The activation link works perfectly.

I would be interested in finding out what code is causing all of this. The ONLY thing that I changed was the BP code.

Last edited 10 years ago by wrowlands (previous) (diff)

#9 @boonebgorges
10 years ago

I would be interested in finding out what code is causing all of this

I would be interested too. If GoDaddy has more information about the "php loop", it would be very helpful. It is emphatically *not* the case that BP 2.2.x has this problem in general; it must be some specific combination of your plugins, themes, and server environment that caused it. (Though the "only thing you changed was the BP code", it's still likely the case that something else on your installation is ultimately to blame - it was just changes in BP 2.2.x that brought the problem to light.) I'm afraid that without further info along these lines it probably won't be possible for members of the development team to debug.

#10 @wrowlands
10 years ago

Our theme is DynamiX 4.2.2
Plugins:
Add New Default Avatar v 1.3.1
Advanced Excerpt v 4.2.3
Akismet v 3.0.4
Author Avatars List v 1.8.6.4
bbPress v 2.5.4
Better User Shortcodes v 1.0
BP Group Default Avatar 0.1.1
BP Profile Search v 4.0.3
BP Webcam Avatar v 0.8
BuddyPress Auto Group Join v 2.2.1
BuddyPress Avatar Bubble v 2.5.1
BuddyPress Group Email Subscription v 3.5.1
Buddypress Social v 2.0
BuddyPress Toolbar v 1.6.0
Cron GUI 1.03
Custom Admin Bar v 1.3.1.1
Envato WordPress Toolkit v 1.4
Events Manager v 2.3.8.1
Events Manager Pro v 2.3.8.1
Extended API v 0.8.1
Fast Secure Contact Form v 4.0.33
Google Language Translator v 4.0.9
Invite Anyone v 1.3.6
iThemes Security 4.6.10
Jetpack by WordPress.com 3.3.2
Rename XMLRPC v 1.1
Revolution Slider 4.6.5
s2Member Framework v 150225 + S2Member Pro v 150225
SI CAPTCHA Anti-Spam 2.7.7.5
sxss Buddypress Shared Friends v 1.0
WangGuard v 1.6.2
Welcome Pack v 3.3
WooCommerce 2.3.5
wp-xmlrpc-modernization v 4.4.2
WP Better Emails v 0.2.8
WP FullCalendar v 0.8.4
WPMU DEV Dashboard v 3.4.9

#11 @wrowlands
10 years ago

I took a look at the code for BP version 2.2.1. I believe that I have found the problem. The activation key that is sent from version 2.2.1 creates a link with "http://rotarymeansbusiness.com/members/activate/9911a002b4e09ad237e2135ad1cae4ae. The activation key with version 2.1.1 creates a link with http://rotarymeansbusiness.com/members/activate/?key=9911a002b4e09ad237e2135ad1cae4ae. As you can easily see, there is the missing function within the link that inputs the activation text into the activation form found on the activate page. Without the fuction code, the link directs someone to a page on the site that does not exist.

As to the php loop issue that was being exhibited with version 2.2.1, I cannot duplicate this without updating to version 2.2.1. At this moment I do not want to update to this version as we have a live site with member activity 24x7 from over 29 countries.

Last edited 10 years ago by wrowlands (previous) (diff)

#12 @r-a-y
10 years ago

wrowlands - It looks like the issue is due in part to changes made to reset the post ID to zero (r9322) and that you have nested your registration and activation pages as a child of the members page (/members/register/, /members/activate/).

Moving the registration / activation pages to a parent will probably fix these issues, but will break existing registration links already sent via email.

Looking into it.

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

#13 @wrowlands
10 years ago

I just changed the activate page so that it does not have a parent. I signed up a new user and then sent over the activation key where the code /?key= was removed. When I do this, I am brought to the activation page and am presented with the message: "Please provide a valid activation key." Under this text is the form to insert the activation key. This is not helping. From what I can see, the activation link being created by BP version 2.2.1 is missing the insert activation key code. According to @johnjamejacoby, this code was changed and his belief is that it should have been backwards compatible. From what I can see, the new code is not backwards compatible.

Last edited 10 years ago by wrowlands (previous) (diff)

#14 follow-up: @r-a-y
10 years ago

For me, the registration and activation pages fail to load any content when they are nested under the Members directory page in both BP 2.1.1 and BP 2.2.1 (example.com/members/register/, example.com/members/activate/) using either theme compatibility or the bp-default theme. So I'm not sure how you're getting your registration page to load at /members/register/.

In BP 2.2.1, I just tested email activation successfully in both formats - example.com/activate/HASH/ and example.com/activate/?key=HASH.

Do you have any redirect code snippets relating to the register or activation pages anywhere (your theme's functions.php, .htaccess)? . Also try disabling iThemes Security.

Preferably, please test changes in a development environment before deploying them live on your site.

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

#15 in reply to: ↑ 14 @wrowlands
10 years ago

Replying to r-a-y: Thanks for this information. I now have both pages /register and /activate as parent pages. For right now, everything is working fine in setting up new users. The rest of the site is also working well. I currently do not have much time to deal with all the other testing that will be required. I am wishing that someone at BP finds a solution and we can move on. My other wish is that this is not a conflict with my theme and/or other plugins. That will be tough as I require all of them. Our site has been the subject of many hack-attempts and all the security that we have in place right now is working to stop it. Our site has no confidential information, although hackers want in. Additionally, I am just a volunteer who is helping out here.

For me, the registration and activation pages fail to load any content when they are nested under the Members directory page in both BP 2.1.1 and BP 2.2.1 (example.com/members/register/, example.com/members/activate/) using either theme compatibility or the bp-default theme. So I'm not sure how you're getting your registration page to load at /members/register/.

In BP 2.2.1, I just tested email activation successfully in both formats - example.com/activate/HASH/ and example.com/activate/?key=HASH.

Do you have any redirect code snippets relating to the register or activation pages anywhere (your theme's functions.php, .htaccess)? . Also try disabling iThemes Security.

Preferably, please test changes in a development environment before deploying them live on your site.

Last edited 10 years ago by wrowlands (previous) (diff)

#16 @r-a-y
10 years ago

I now have both pages /register and /activate as parent pages. For right now, everything is working fine in setting up new users. The rest of the site is also working well. I currently do not have much time to deal with all the other testing that will be required. I am wishing that someone at BP finds a solution and we can move on.

If email activation is now working, what is the problem that needs to be solved?

To me, the curious thing is how you got the registration page to show up at /members/register/. Any details here would be great.

I've tested as low as BP 1.5.7 and the registration page does not show up when it is a child of the Members directory page.

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

#17 @wrowlands
10 years ago

@r-a-y - From the beginning of this site I have made the registration page /members/register/ and the activation page /members/activate/. This has always worked on our site. Up to this very moment, our site has not had very many issues with the registering and activating of members. There was one time in the past (maybe a year ago) when the this was an issue. The link to the activation page had an issue then and the BP team fixed this after I showed them the problem with the php code. It appears that the invalid code has once again shown up. In the past the BP team showed me the php code and I figured out what the problem was. If you share the code with me I could take a look. Maybe another set of eyes on this may shed some light. I am happy to help.

Last edited 10 years ago by wrowlands (previous) (diff)

#18 @hnla
10 years ago

@wrowlands
You state two comments back:

For right now, everything is working fine in setting up new users. The rest of the site is also working well

r-a-y then asked:

If email activation is now working, what is the problem that needs to be solved?

It would help to answer these questions and others asked so that we can know if there still is an issue that requires looking into.

#19 @wrowlands
10 years ago

@hnla
Our website is now working due to the fact that we reverted back to BP 2.1.1. The issues exist in BP 2.2.1. That is the issue. According to @johnjamesjacoby the code was changed for user activation and it appears that this an possibly some other code with the recent revisions are causing problems with such things as activation and returning back 403 errors due to some sort of php loop.

#20 @r-a-y
10 years ago

Please answer the following question from comment:14:

Do you have any redirect code snippets relating to the register or activation pages anywhere (your theme's functions.php, .htaccess)?

Also, if you want to help us debug and if you do not have a development environment, please create a new WP install in a subdirectory on your server (example.com/testinstall/) and install BuddyPress 2.2.1 with no other plugins. Then, try and recreate your bug there. This is to ensure that your problem isn't due to a plugin conflict.

#21 @wrowlands
10 years ago

I will be getting back to you regarding this matter in a couple of days. Right now I do not have the time to spend on this matter. At the moment our site is running fine with the older version of BP. I will make some time in approximately two days and will report back to you.

#22 @wrowlands
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I believe that I have figured out the issue with the latest version of BuddyPress. In the past I have had the BuddyPress pages as a child to the directory "members". Up to this point this worked with my theme, DynamiX. The latest version of BP now requires the BP pages be primary pages. Once I have moved all those pages to primary pages, the code now all works. From what I can see, this solved this issue.

It will be important to make it known that these pages CANNOT be child pages. It would be great if there was a notice within the Admin BP Pages Setup Menu saying something like, "IMPORTANT - BuddyPress Component and Registration pages MUST be primary pages. These pages CANNOT be child pages." If we have this notice in the admin, I believe that others will not run up against this issue.

Thanks again to the BP admin team for helping me sort this out.

Wayne Rowlands

Last edited 10 years ago by wrowlands (previous) (diff)

#23 @johnjamesjacoby
10 years ago

One of the reasons to use pages was to be able to nest them anywhere you might want to. I know this used to work, so if it isn't anymore, it wasn't on purpose (that I know of.)

#24 @Algaraba
9 years ago

Thanks to the query of @wrowlands" and responses of @johnjamesjacoby solvent also my problem.
Indeed you should note that the registration and activation pages can not be childs pages in admin panel and docs. This is important, please take it into account.

Note: See TracTickets for help on using tickets.