LearnPress / learnpress

LearnPress WordPress LMS Plugin by ThimPress
https://thimpress.com/learnpress
242 stars 142 forks source link

Permalinks of comments on lessons are broken in version 4.2.2.2. #541

Open voria opened 1 year ago

voria commented 1 year ago

As of title, comments' permalinks are non-working in version 4.2.2.2 and lead to a 404 error.

For example, suppose to have a course with the following permalink: /courses/<course_name> and a lesson assigned to it with enabled comments and the following permalink: /courses/<course_name>/lessons/<lesson_name>

When an user posts a comment to the lesson, it gets a non-working permalink: /lessons/<lesson_name>/#comment-<number> instead of the correct one: /courses/<course_name>/lessons/<lesson_name>/#comment-<number>

Downgrading the plugin to version 4.2.1.1 fixes the error.

tungnxt89 commented 1 year ago

Hi voria,

Can you provide us link your site? We install LP v4.2.2.2 on site https://testlp.thimpress.com/courses. It runs normally. What is the list of plugins you install on your site? Can you disable all plugins without LP and recheck? Can you capture the setting of LP for us? Are you saving LP Settings? We'll find the reason to make it run wrong.

Thanks.

voria commented 1 year ago

Hello, I'm still working on my site and it's not online yet.

Anyway, I just tried to post comments on https://testlp.thimpress.com and the same problem is happening there too. I've posted a couple of comments on lesson L1 of course Course 1 and, even if you have comments moderated and they don't appear yet, I can still see it trying to redirect me on the wrong permalink after I click on 'Post comment'.

tungnxt89 commented 1 year ago

Hi voria,

You don't see your comment, because, the system waits for approve like the image We'll approve it, and you can come back to check.

Thanks.

voria commented 1 year ago

Just for info, I've update to the just-released v4.2.2.3, the problem is still there. Again, the problem first appeared in v4.2.2, downgrading to v4.2.1.1 fixes it.

voria commented 1 year ago

My comments at https://testlp.thimpress.com/ have been approved, and the problem is there as I described.

I posted my comments at https://testlp.thimpress.com/courses/uncategorized/course-1/lessons/l1/.

If you hover with your mouse over the comments' dates you can see the permalinks are wrong. For instance, the first comment links to https://testlp.thimpress.com/lessons/l1/#comment-12 while it should link to https://testlp.thimpress.com/courses/uncategorized/course-1/lessons/l1/#comment-12.

tungnxt89 commented 1 year ago

Hi voria,

We see it, we'll fix it soon. When we have done, we'll reply to you.

Thanks for the feedback.