I have a strange redirect going on

I have been trying to get my membership site going at at http://www.risingstarentertainmentnetwork.com but I have some sort of redirect issue that's giving me heck. If you go to the page and click on the menu item "Members Only Content" it should go to https://risingstarentertainmentnetwork.com/protected-content/ but it redirects to a really long variation and I get the page that asks me to login to access protected content. That I believe is the page I should be getting if I'm not logged in but anybody trying to login there gets the "Failed login" message. I've set up a dummy account as a paid subscriber with the username of "johndoe" and password "1209hmdr" which should work but does not. It does allow me to log in from the wp-admin login but still can't access protected content. I just can't figure out what's causing the redirect. Can someone take a look please?

Thanks,
Larry

  • lbartley

    Thanks Milan-

    Thanks for your response. I'm sorry- I should have mentioned that I had already been through the troubleshooting procedure you mentioned. I deactivated all plugins except for Membership Pro 2, Domain Mapping, and of course WPMUDev dashboard. Howwever the last plugin deactivated before that, JetPack, broke my site completely to where after re-activating the site was still broke. I had to restore from Snapshot to get it back. I also tried replacing the current theme with TwentyFifteen. and nothing made a difference. I might add that we just installed an SSL cert recently which possibly could have something to do with it.

    Larry

  • Adam Czajczyk

    Hello Larry,

    Thank you for granting access.

    I've visited your site and I noticed that content protection for "Members Only Content" archive was turned off so in order to test it I protected "Premium" category with monthly membership (I switched that off again already). I then took a look at your site as a not logged in visitor.

    1. After clicking on "Members Only Content" I was redirected to
    https://risingstarentertainmentnetwork.com/protected-content/?redirect_to=http%3A%2F%2Frisingstarentertainmentnetwork.com%2Fcategory%2Fpremium%2F

    This is as it should be. As you see it is in fact /protected-content/ page and there's a parameter saying that after logging in visitor should be redirected back to where she/he came from (in this case back to "Members Only Content".

    2. I logged in using the test account that you provided; login went fine

    3. However, I can confirm that although "johndoe" is a member of monthly membership, the content remained protected. I think this may something to do with a fact that the site has a mapped domain and that mapped domain is forced to run over https while an original site is over http. I'm not aware of any current issues/bugs similar to this but I think that's something specific to your setup.

    That said, I review your network settings and this sites settings and I'd like to ask you how the site is being redirected from http to https - is there any .htaccess redirect implemented or any plugin setting that (in case I didn't noticed that)? Let me know please.

    Best regards,
    Adam

  • lbartley

    Thanks Adam-

    I've re-activated support access so you should be able to take a look at this again.

    I understand now that the redirection described is the way it's supposed to work. For a while it was being redirected to rsen.spi.us which is the sub-domain that I'm mapping to. The subdomain has no SSL so that wasn't working and was the cause of missing images as well. That seems to be resolved, maybe, but could still be a factor in this issue. As far as I can tell the only redirection I'm doing is with your domain mapping plugin and I have tried every conceivable option of forced and not forced configuration. The contents of my .htaccess file is copied below but I can't see any issues there myself.

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    # END WordPress

    The problem as I see it at the moment is that when the Premium category is protected, I can only sometimes log in as johndoe but most often I cannot and keep getting the login failed message. On the rare occasions when it acknowledges I'm logged in, clicking on the Members Only Content leads me back to the log in page. At one point I could view the protected category when logged in as administrator but currently I cannot. This is consistent with many of our members complaining they cannot log in at all. This led us to disable category protection completely until we can work this out.

    To sum up- this is a new installation of the Membership Pro 2 plugin and I've never been able to get it to work right. There should only be one category of protected content which is "Premium". There are 3 levels of paid membership, monthly, 6 month, and yearly plus a guest membership. All paid memberships get access to everything. Any visitor whether registered as a guest or not get access to everything except the "Premium" category. We will prompt visitors to register as a guest to receive newsletters.

    Please advise if you need any more information for clarification.

  • Adam Czajczyk

    Hello Larry!

    Please accept my sincere apologies for such an extreme delay on your other threads. Somehow I missed a notification of your e-mails that you sent regarding those threads and as a result I didn't assist you further. I'm really sorry and I apologize for causing trouble and keeping you waiting! I'll review all those threads and replay to you ASAP.

    As for this issue. Thank you for this explanation. Let me please consult Membership 2 Pro developer on this and hopefully he'll be able to suggest the way we should go with this. I've already asked him for help via our internal chat and I'm sure he'll respond once he gets back online for work. I'll immediately get back to you here then.

    Kind regards,
    Adam

  • Adam Czajczyk

    Hello Larry!

    As I said before, I brought the issue in front of Membership 2 Pro developers. The recent updated that you already applied to your site (or that was automatically applied) should fix the issue.

    That said, I've visited your site again and went through the same test steps as previously. Here's a brief summary:

    - I visited /category/premium page
    - it redirected me to /protected-content and gave a protected content message and form
    - I logged in with the test account
    - I was redirected back to /category/premium page
    - the content become open for me (both article listing and articles)
    - to make sure that the test member's got proper membership, I visited /account page - johndoe memberships are as expected

    To make sure that it's not a "one time luck" I run the same test a few times more, including: Firefox Incognito mode (Windows 7), Firefox "regular" mode (Windows 7), Chromium browser (Linux) and Edge browser (Windows 10). Each time all seemed to be working again.

    I can see that currently your "Members Only Content" link points to a regular WP login page, however it should be working just pointing to the category (as previously).

    Having said that, I'd like to ask you to give it a try yourself to double-check and hopefully confirm my test results. Please however make sure that you've fully cleared your browser's cache before testing it.

    Let me please know of the result and in case it was necessary I'm still in constant contact with developers.

    Kind regards,
    Adam

  • lbartley

    Thanks for getting back with me Adam-

    I still can't see a lot of difference from my end. After clearing all browser data and I log in at http://risingstarentertainmentnetwork.com/category/premium I usually can log in and it takes me to the premium content page. Logging out and trying to log in again takes me to the attached desktop screen shot. Regardless of whether I log in successfully or not, my header and background images disappear at that link and leave me with only a black background. Going to any other page when logged in from that link also has the header and background images missing. When logging in from http://risingstarentertainmentnetwork.com/wp-admin everything displays as it should. Logging in and doing the same test from my laptop produces the same results with the header and background images missing except my navigation bar is cut in half, displays further up and going of the top of my page. See attached laptop screenshot. I've just re-enabled support access in case you want to look at it from there. Please note that I currently have a child functions.php activated to direct logged in users to the appropriate menu. I did try the above tests with it activated and de-activated with the same results.

    Larry

  • Adam Czajczyk

    Hello Larry,

    Thank you for your response!

    I've check this all again just to make sure that I didn't miss anything.

    Initial issues here were:

    1. The "strange" redirect
    2. The fact that protected content was not available to authorized members.

    The first one was just a matter of of how the Membership 2 Pro content protection form works and as I believe we already got it sorted out.

    The second one was definitely more complex issue. I know that you found a workaround for this by "forcing" users to login via default WP login form. However, the recent update should bring the fix for it and this workaround should be no longer necessary. I mean that you should now be able to set your site back to how it was set before ("Members Only Content" menu item pointing to the "/category/premium") and:

    - members should be able to properly log in/out
    - get access to that protected "Members Only Content"

    This seems to be working fine and I hope that if we (just for the moment) skip the "missing header" issue, you could confirm that it's now fixed. Could you please check it one more time and let me know (ignoring "missing header" for this tests)?

    In case you confirm that it works, this particular issue could be considered solved.

    I mentioned "skipping" missing header because it is entirely different issue that doesn't seem to be related at all to what we were working on here. The header "breaks" because the image is missing and the image is missing because of some kind of "yet to be identified" glitch in SSL configuration/setup for your site. I believe you started a separate thread on this here:

    https://premium.wpmudev.org/forums/topic/losing-images-after-ssl-installed#post-1047652

    The issue described there partially affects the "missing header" you mentioned here. mage link gets a SSL error. After login the site redirects to "no SSL", so the image loads. After logout the site loads with SSL, so broken SSL image link is not loaded. I'm sure we'll be able to help you with this as well and it would be great if we could continue this withing that other (SSL related) thread of yours. That would help us work faster and track issues more accurately.

    Kind regards,
    Adam

  • lbartley

    Thanks Adam-

    As best as I can tell I've set up the protected content and menu items as described in the instructions. After clearing browser cache each time I'm sometimes able to log into protected content using johndoe and 1209hmdr but most times not. When I can log in I get directed to all content including protected which is how I think it's supposed to work. When logged in I can also access all items by category under "View Content By Categories" including the "Protected" category. Then when logging out and trying to log back in the same way it works maybe 1 time in 20 if that. I've ditched the child theme and reverted to the unaltered icyNETS Simplic theme. I also have tried the same procedure with the standard Twenty Fifteen theme and they've all behaved the same for me. Would you please check my menu and any other pertinent settings to see if they look right to you?

    Thanks for your help-
    Larry

  • Tyler Postle

    Hey Larry,

    That's very odd. I'm still not seeing that behaviour. I've created a screencast to illustrate what I see.

    Can you tell me if I'm doing the same process you are? This test is done in IE, but I also tested with Firefox and Chrome as well. http://screencast.com/t/4ZedQwiEI

    These are the steps I take:

    1. Click "Premium" menu item

    2. Login with Johndoe and get redirected to your premium category

    3. Logout with the sidebar widget

    4. Visit "Premium" again to re-login

    In my tests, it's working exactly how it's setup too. Aside from losing the images on the login page but as Adam mentioned that's due to an SSL conflict that we'll troubleshoot further after :slight_smile:

    If you would be able to take a screencast of what you're seeing exactly then that would be really helpful too.

    Look forward to hearing back.

    Cheers,
    Tyler

  • lbartley

    Thanks Tyler-

    I don't have the means to record a screencast but the procedure in your screencast is exactly what I'm doing. I've repeated the same tests today more than 10 times and always the same. As a reminder, about 20-30% of the time I'm able to login after clearing my browser cache but almost never for the second time without clearing my cache again.

    I'm wondering if this could still have something to do with caching, maybe on my server or the site itself? I'm not experiencing the same issue with the other sites but SSL is not a factor with any of them. I'm also wondering if it might be related to users and their location in the world. I'm using Wordfence to block specific IP#s but I've disabled it and repeated the test several time with no change. 99.9% of our users are located in Texas. My client lives 50 miles away and his assistant almost 100 miles away but still in Texas. They are verifying the same login problems and our users reporting a problem are all in Texas.

    I appreciate your help-
    Larry

  • Adam Czajczyk

    Hello Larry,

    Thank you for your response!

    I can see what's the point here. I've been unable to replicate that as I was always able to login/logout while testing (pretty much the same as Tyler) but I'm sure there must be some kind of "glitch" that we just didn't manage to identify yet.

    I'm wondering if this could still have something to do with caching, maybe on my server or the site itself? I'm not experiencing the same issue with the other sites but SSL is not a factor with any of them. I'm also wondering if it might be related to users and their location in the world.

    I think server caching is most likely not an issue here as in most cases it would affect us here two, especially given that we're a globally distributed team. I'm operating from Poland currently but as Tyler and some other colleagues of mine here had also tested it, we've got it checked from quite huge piece of the globe :slight_smile:

    However, I think we just need more tests on this and we need to narrow down possible issues. I've seen on one of your screenshots that you were testing this on Windows 10 I think. I understand though that you have reports from other users of your site as well. By any chance, were you able to spot any other "common ground" here except the location in Texas? For example: browser/os type or anything else that you can think of?

    Let me know here in this thread please and meanwhile I'll run some more tests on this.

    Best regards,
    Adam

  • lbartley

    Thanks Adam-

    I've been out verifying a few things this morning. My client is using an Android mobile device and his assistant is using an iPhone and neither currently have access to a laptop or any other device. They both experience the same behavior. They have complained that their users are calling and telling them the same but I can't verify what devices they're using. I have tried with my desktop, laptop, iPhone, and Kindle all with the latest updates and with the same behavior. Collectively we're logging in from 3 different IP#s. I just got back from a colleagues office where she is running Win7. I tried logging in 25 times or more and received only 3 login failures. She also had WinXP on another machine and I tried there with no failures at all so I would call it pretty much successful from her 2 devices from a 4th IP#. I tried logging on with my iPhone through her IP# but no go. I returned to my office and dug out an old netbook running Win7 and was back to the same failed login after the first behavior. I then dug out my even older laptop running XP and was unable to log in at all.

    Chears,
    Larry

  • Adam Czajczyk

    Hello Larry,

    Thank you for your response!

    You may find out in your logs that I've just logged in as "johndoe" user several times (around 20-30 I think) in a row successfully. I did however noticed something that bothers me. Let me explain :slight_smile:

    This time, I was checking logging in using Firefox "Incognito" mode. I was able to login and logout (the same way as Tyler did) with no issues. One time I mistakenly used wrong login and a result was just as I expected: I was notified that the content is only available to members and presented with protected content login form again - I was able to login using proper credentials.

    I did however switched to "regular" (non-incognito) browser window trying to replicate the same test. First I used a site URL as a password (so essentially a wrong password), then wrong login. I'm not sure whether I did this twice or more times but as a result I wasn't able to login even with proper credentials any more.

    That made me thinking that there may be some other issue than a Membership 2 Pro bug involved. I've then accessed your site via support access and found out that I was locked out by Wordfence. There's login protection tool enabled that's monitoring login attempts. Unblocking (using an "Unblock" link in Live Traffic list) didn't help here. I'm still able to login using "incognito" browser mode with no issues but not using a non-incognito mode.

    That said, I'm beginning to thing that this may be related here. It seems that the Wordfence may be a bit "over sensitive" here and - though I admit I'm not sure about it - it may be also creating "false" blockades here.

    I think this is worth checking, however I decided not to disable Wordfence withouth your prior consent as it is there for a reason. Also, simply disabling that plugin may not help immediately. For sure it would require clearing browser memory and removing all cookies as those seem to be store (those blocking ones) regardless whether the user has been manually unlocked or not. I didn't notice any caching plugins on your site but I'm not sure if there's any server-level cache implemented - if so it will probably be necessary to clear and disable it temporarily in order to run more test against that.

    As I said, I admit I'm not 100% sure about that but I think it's definitely worth checking.

    Best regards,
    Adam

  • lbartley

    Thank you Adam-

    I've been watching this for a few days and it appears the login issue has just gone away. I will reply to the Wordfence issue you mentioned though. During the time we were testing and trying to correct the login issue I did have Wordfence disabled for my entire network because I had already suspected it might be an issue. I had only reactivated it shortly before you investigated the last time. Although it's entirely possible Wordfence had some bearing on the login issue I feel like I personally tested with and without activation enough that my "gut feeling" is it was not. At any rate all seems to be working fine for several days now so I'm considering this ticket resolved. I appreciate your help on this matter.

  • lbartley

    Well tonight I find I'm back to having login issues for protected content again. Now when we log in we can see the page with the protected posts but clicking on one of the posts requires us to log in again. When logging in for the second time we can view the protected video but going back to the protected content page we're forced to log in again. then when we try to view the next video we're forced to log in again, etc., etc. something seems to have broken again. Any ideas?

  • Adam Czajczyk

    Hello Larry!

    I can see that the support access to your site is open. Could you also please let me know to which posts/videos are you referring? Does this apply to any specific membership/membership type or that doesn't matter?

    Just for future reference, it would be great if you could start separate threads for issues that are not strictly related to initial one. In this case though, let's continue here :slight_smile:

    Looking forward for your replay,
    Adam

  • lbartley

    Thanks for your reply Adam-

    This is the same issue I you've been helping me with that has quit working again. Members to risingstarentertainmentnetwork.com just keep having issues with viewing ANY protected content. They are now logging in and immediately having to log in again to view each item in the "protected" category. Viewing one item then going to the next requires them to log in again.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.