• Resolved thiagocode55

    (@thiagocode55)


    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)
  • Hello @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)
  • You must be logged in to reply to this topic.