Title: Issue with Instructor Profile URL Parameter Causing Unexpected Redirection
Last modified: October 14, 2024

---

# Issue with Instructor Profile URL Parameter Causing Unexpected Redirection

 *  Resolved [thiagocode55](https://wordpress.org/support/users/thiagocode55/)
 * (@thiagocode55)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/issue-with-instructor-profile-url-parameter-causing-unexpected-redirection/)
 * Hi guys,
 * I’m facing an issue with the instructor profile URLs in Tutor LMS. The link to
   the instructor’s profile is generated as follows:
 * `https://site.com.br/profile/professor?view=instructor`
 * When a user is **logged in**, clicking on this link correctly takes them to the
   instructor’s profile page. However, when a user is **not logged in**, this link
   redirects to a random post instead of the instructor’s profile.
 * After some investigation, I found that the link is being generated by the function`
   tutor_utils()->profile_url`, which includes the `view` parameter. When I remove
   the `?view=instructor` parameter from the URL, the link works as expected for
   both logged-in and non-logged-in users.
 * I’m suspecting that the issue lies in how the `view` parameter is being handled,
   possibly due to permission checks or redirection rules.
 * **My Questions:**
    1. Is there a specific configuration to make this work correctly with the `view
       =instructor` parameter for non-logged-in users?
    2. Where exactly is the `view` parameter used in the Tutor LMS logic? Are there
       any hooks or filters that I could use to modify the behavior without modifying
       the core plugin files?
    3. How can I ensure that the instructor profile page works correctly for both logged-
       in and non-logged-in users, whether or not the parameter is present? Or how 
       do I remove this parameter without changing the original function?
 * Any help would be greatly appreciated!

Viewing 1 replies (of 1 total)

 *  [Nafiz](https://wordpress.org/support/users/urnafiz/)
 * (@urnafiz)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/issue-with-instructor-profile-url-parameter-causing-unexpected-redirection/#post-18080674)
 * Hello [@thiagocode55](https://wordpress.org/support/users/thiagocode55/),
 * Thank you for reaching out to us!
 * I understand your concerns and would be glad to assist you further. Based on 
   the behavior you’re describing, it seems likely that this could be a plugin or
   theme conflict. To help troubleshoot this issue, please follow these steps to
   check for any conflicts:
    - **Deactivate all plugins** except Tutor LMS, and check if the instructor profile
      URL works correctly for both logged-in and non-logged-in users.
    - **Switch to a default WordPress theme**, such as Twenty Twenty, to see if 
      the issue persists. This will help identify whether the theme is contributing
      to the problem.
 * If the issue is resolved after doing this, you can reactivate your plugins one
   by one and test after each activation to pinpoint the conflicting plugin. Similarly,
   you can switch back to your original theme and test if that is where the conflict
   arises.
 * Please give this a try and let me know what you find.
 * Looking forward to your update!
 * Reagrds,
 * Mohammad Nafiz

Viewing 1 replies (of 1 total)

The topic ‘Issue with Instructor Profile URL Parameter Causing Unexpected Redirection’
is closed to new replies.

 * ![](https://ps.w.org/tutor/assets/icon-256x256.gif?rev=3193875)
 * [Tutor LMS - eLearning and online course solution](https://wordpress.org/plugins/tutor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tutor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tutor/)
 * [Active Topics](https://wordpress.org/support/plugin/tutor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tutor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tutor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Nafiz](https://wordpress.org/support/users/urnafiz/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/issue-with-instructor-profile-url-parameter-causing-unexpected-redirection/#post-18080674)
 * Status: resolved