cms icon indicating copy to clipboard operation
cms copied to clipboard

bug: when clicked on any video in the history, it redirects to the main page

Open Devmanwani opened this issue 1 year ago • 7 comments

https://github.com/code100x/cms/assets/36275192/c0a8e9af-68e0-4cb7-84d3-948de7320c3b

Devmanwani avatar Apr 08 '24 13:04 Devmanwani

the issue seems to be with the authorisation , please try to logout and login back again

aakash2330 avatar Apr 08 '24 15:04 aakash2330

Hey are you working on this??

prajjwal2-3 avatar Apr 08 '24 16:04 prajjwal2-3

no , go ahead @prajjwal2-3

aakash2330 avatar Apr 08 '24 16:04 aakash2330

Hi , unable to reproduce the issue on local.

heyhexadecimal avatar Apr 08 '24 21:04 heyhexadecimal

Hi, I just checked it it is doing what it should be. Not able to reproduce on either online or local

Basant-Chahar-2003 avatar Apr 09 '24 03:04 Basant-Chahar-2003

it is a brave specific issue, when I watch a video in brave, the link doesn't open up, while when I watch a video in chrome, it does open up. But works fine locally....

Devmanwani avatar Apr 10 '24 08:04 Devmanwani

After testing the watch history functionality a lot, I want to include the fact that this bug exist and it is doing that for some videos. I tried to find the bug in code but didn't get any luck but after exploring the network request for this specific functionality I got an idea why it is happening.

Watch history videos are being rendered by creating a dynamic URL using below code->

            const { id: folderId, courses } = parent;
            const courseId = courses[0].courseId;
            const videoUrl = `/courses/${courseId}/${folderId}/${contentId}`;

parent object return the courses array where gives the courseId from which the video belongs to but for some videos the response is something like this ->

parent":{"id":267,"courses":[{"courseId":1,"contentId":267},{"courseId":2,"contentId":267},{"courseId":3,"contentId":267}]}

It gives an array of courses(I don't why) and it chooses the wrong courseId hence redirecting the website to dashboard.

@hkirat Can you check if my testing is correct about this issue. Seed data wasn't enough to further test but I am working on it right now, creating more dummy seed data.

Abhishek-1337 avatar Apr 10 '24 13:04 Abhishek-1337