cms icon indicating copy to clipboard operation
cms copied to clipboard

bug: Search functionality not working

Open Rutwik187 opened this issue 10 months ago • 5 comments

Describe the bug When a user types a topic name in the search bar, relevant suggestions appear correctly. However, clicking on any of the suggested topics redirects the user to the home page instead of the corresponding course page.

To Reproduce Steps to reproduce the behavior:

  1. Navigate to the search bar on the home page or the /courses page.
  2. Enter a topic name (e.g., WebRTC).
  3. Click on one of the suggested topics.

Expected behavior Clicking on a suggestion should open the corresponding course page related to the selected topic.

Actual Behavior Instead of navigating to the course page, the user is redirected back to the home page.

Screenshots or GIFs Image

Info (please complete the following information):

  • Browser chrome
  • Version 132

Rutwik187 avatar Feb 09 '25 05:02 Rutwik187

Search works on local environment but fails on deployed production environment 🤔 @devsargam any thoughts ?

Rutwik187 avatar Feb 09 '25 05:02 Rutwik187

@Rutwik187
It's not like working in local environment and not working in production environment.. The problem is : It redirects to home page for some suggested topics and redirects to the actual corse for some topics

https://github.com/user-attachments/assets/643498ab-0353-4977-b069-5bf43ce97ebd

gcbibek3353 avatar Feb 12 '25 05:02 gcbibek3353

@gcbibek3353 it redirects you to the homepage only if you don't have access to the content for eg. If you are a Cohort 2 student trying to search for a cohort 3 content. It shows you the content but does not give you the access to see it.

Pruthvik-P avatar Feb 16 '25 17:02 Pruthvik-P

Ohh. got the issue. thanks @Pruthvik-P .

I think improvement can be done where proper error message can be displayed that you do not have access to the content instead of just redirecting to home page. Or we can have a check that only displays the topics that are accessible to the user. (but it will reduce the search speed 🤔)

Rutwik187 avatar Feb 17 '25 07:02 Rutwik187

Ohh. got the issue. thanks @Pruthvik-P .

I think improvement can be done where proper error message can be displayed that you do not have access to the content instead of just redirecting to home page. Or we can have a check that only displays the topics that are accessible to the user. (but it will reduce the search speed 🤔)

No I think those should not be shown at all

Pruthvik-P avatar Feb 17 '25 07:02 Pruthvik-P