• Resolved Remko

    (@7ish)


    I have set a regular page for non enrolled users. When the user is NOT logged into WordPress with their account, all is working well.
    When they ARE logged into their WordPress account, a browser error is shown: ERR_TOO_MANY_REDIRECTS.
    What could be the problem? It has worked before.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Uncanny Owl

    (@uncannyowl)

    Hi Remco,

    There are unfortunately a few things that it could be, including:

    – Invalid http vs. https settings in your WordPress settings or in your redirect, make sure everything is https.
    – Something else on the page you’re redirecting to redirect users back to where they’re supposed to go. (A good example here would be a course page redirecting to a sales page from our module, then the sales page redirecting to the course page if it detects the user is logged in.)

    One thing you might try doing is cloning to a Staging environment, disabling everything except LearnDash and the Toolkit, then see if you can reproduce it. If it doesn’t happen there, try reactivating plugins until it triggers; that way may you can isolate whether another plugin is causing the loop, and if so, what’s doing it and why.

    Thread Starter Remko

    (@7ish)

    Thanks for the quick reply! The reason for this redirect loop, is that I have set a redirect from my course template OUTSIDE of the training to the first lesson INSIDE the training. UX wise this feels like a good decision from my end.

    But because the not enrolled user is not allowed to go there, he is redirected to the training template. Hence the loop. ??

    This brings me back to the cause: why is the not enrolled (but logged in) user not being redirected to the URL that is set? Why is the course template shown with all course content on it?

    I already created a staging site on which I disabled all plugins except for Learndash and Uncanny Toolkit but it still did not work.

    Is there a conflict or mismatch between Toolkit 3.6.1 and Learndash 3.6.0.3?

    Plugin Author Uncanny Owl

    (@uncannyowl)

    Sorry @7ish , if I’m understanding correctly, you might be trying to redirect users to the a lesson inside a course that the user isn’t enrolled in? So maybe they’re logged in but not enrolled? You couldn’t do that though, the LearnDash redirect to take users without course access back up to the course would conflict with the redirect you set in our module to the lesson.

    When you say “course template”, is it a course post type you mean? And you’re redirecting to a lesson post type? Maybe we need more context for the UX decision, because I’m not sure why you would redirect a user that’s not in the course inside a lesson (unless it’s set up as a sample lesson, that would work).

    Thread Starter Remko

    (@7ish)

    “if I’m understanding correctly, you might be trying to redirect users to the a lesson inside a course that the user isn’t enrolled in? So maybe they’re logged in but not enrolled?” This is exactly what is happening.

    But, this is happening because the redirect from the training is not being applied. Instead of the redirection for non-enrolled users the training template (with all course content) is shown (and therefore the redirect to the first lesson is applied). This should never happen for non-enrolled users, since they are not allowed to see the course content yet. This is the reason why I use your plugin in the first place: to lead non-enrolled users to a sales page.

    Plugin Author Uncanny Owl

    (@uncannyowl)

    Hi @7ish , we’re still a bit stumped with the specific scenario here. If our redirect isn’t applied it shouldn’t create a looping situation described in the original request.

    We’re also wondering if caching is a factor, and we need clarification around the post type you mean for “training template”.

    Perhaps the best way forward would be submit a test case on our website, in your account if you have one or via [email protected], with the following details:

    – landing page URL for the user
    – redirect target when not enrolled
    – training template URL
    – URL of the page triggering the loop

    That should help us trace what’s happening and why. Access in a Staging environment where plugins can be disabled would really help.

    Thread Starter Remko

    (@7ish)

    Hi,

    Thanks for the effort. I tried creating a staging site and on that site all was working well. I found that the issue was me being an administrator. On the staging site I logged in as a customer account and the redirect worked for both me as logged-in user and non-logged-in user.

    For me this issue is solved now!

    Plugin Author Uncanny Owl

    (@uncannyowl)

    Great, we’ll go ahead and close this. Thanks for the update!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Not enrolled redirect not working for logged in users’ is closed to new replies.