• Resolved CB

    (@cbrandt)


    Hello,

    I’ve noticed since a few weeks ago that my website’s All Courses page was not working properly. I could see the courses on Chrome, but not on Firefox or Safari. Today I dug in a bit further, and it turns out that if I roll back LearPress version to 4.1.1 I can see the page alright on all browsers.

    It seems that since version 4.1.2, LearnPress is requiring authentication (user must be logged in) to show the contents of the All Courses page. Since this is a page that lists the courses that are being offered, not necessarily the ones a visitor might have enrolled in, it should show, in my opinion, the contents to visitors regardless of authentication.

    When I visit the page with a non-logged-in user, it returns a 401 error with a code: “rest_login_required”.

    I’d appreciate it if you guys could either fix that, or point me to the right way in terms of properly setting the plugin so that it no longer requires authentication to exhibit the All Courses page.

    Thanks.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support brianvu-tp

    (@briantp)

    Hi,

    Did you try to switch to the default WordPress theme before? We don’t require login to view the course page, we checked on our system and the user, not login can view the course archive page normally.

    Thanks

    Thread Starter CB

    (@cbrandt)

    Ah, ok. So this is a theme issue, right? I’m still using good old Education LMS, but I’ll try and find another theme for it.

    Thank you.

    Thread Starter CB

    (@cbrandt)

    I’ve just tried changing the theme to WP’s default (Twenty Twenty-one), but it still fails to load the courses page, returning instead a 401 error, non-authenticated user.

    The request that is blocked is this:

    /wp-json/lp/v1/courses/archive-course?order=DESC&userID=

    It loads fine if I rollback LearnPress to version 4.1.1, but as soon as I update to any of the subsequent versions, it gets blocked.

    • This reply was modified 3 years, 4 months ago by CB.
    Plugin Support brianvu-tp

    (@briantp)

    Can you send us the version of your Safari and Firefox are you using to check?

    Plugin Support brianvu-tp

    (@briantp)

    What page do you need help?

    Thread Starter CB

    (@cbrandt)

    Can you send us the version of your Safari and Firefox

    I’m using Firefox 94.0.1 and Chrome Version 95.0.4638.69 (Official Build) (64-bit) on my desktop, as well as Safari on my iPhone with iOS 14.8.1.

    When I’m not logged in, they all load the page, but without the courses content, as the JSON file containing the list of courses requires authentication.

    What page

    The page that lists all courses, as set on Dashboard > LearPress > Settings > General, under “All courses page”.

    Feel free to visit the page at https://eauladeingles.com/cursos-online/

    • This reply was modified 3 years, 4 months ago by CB.
    Plugin Support brianvu-tp

    (@briantp)

    Please try to install version LearnPress 4.1.4 to check it

    Thread Starter CB

    (@cbrandt)

    Hi @briantp, thanks for the support.

    I’ve updated to 4.1.4 as instructed, but I’m still getting a 401 error instead of the JSON file that lists all courses. I’ve updated both in my production website, with theme Education LMS, and on a staging version, with the Twenty-Twenty-One theme.

    Plugin Support brianvu-tp

    (@briantp)

    Hi,

    Do you install any security framework for your site? We see that
    https://prnt.sc/1yyon02

    Thanks

    Thread Starter CB

    (@cbrandt)

    any security framework for your site?

    Sorry, but I’ve been trying since yesterday to visualize the screenshot, but it shows a very messed up page, and no screenshot.

    But yes, I do use a security plugin (Ninja Firewall) and a cloud security service (Cloudflare), but the logs for both services do not record any activity when I visit those pages, so they are not blocking anything.

    Also, please remember that as soon as I roll back to LearnPress version 4.1.1, it works fine. So it seems to me that some bug was added when version 4.1.2 came about, and it hasn’t been fixed yet. This bug is causing the json to return a non-authenticated error message for a page that is not supposed to be under login protection.

    Hi @cbrandt,

    thanks for the hint!
    I had a similar issue (with Firefox 96.0.1), where the course page was showing a sort of “cached” starting date and end date for non logged in users, instead of the purchase button. It took me a while to disable all caching, with no luck.

    I just downgraded to the version you suggested, 4.1.1, and suddenly I can see the buy button for logged out users!

    In my case, the browser was getting 401 when posting to /wp-json/lp/v1/courses/continue-course?_locale=user

    Thread Starter CB

    (@cbrandt)

    After further investigation, it turned out that the REST API is being blocked for non-authenticated users by another plugin (Clearfy). Version 4.1.2 of LearnPress started making use of the REST API to generate the courses page, and since that plugin was not letting non-authenticated users in, I could not update. I’ve already contacted their support.

    Hi @cbrandt !!!
    In all versions after 4.1.1 you can no longer see the Buy Now button. It looks as if you have already purchased the course and some weird duration information is displayed below it. Can you tell me how you solved? I can see the buy button now but because I have downgraded to version 4.1.1 where everything is fine. Thank you very much.

    Thread Starter CB

    (@cbrandt)

    you can no longer see the Buy Now button

    Hello @mauroguitar,

    I’m sorry but all my courses are free and I don’t think I ever set a Buy Now button.

    I suggest you open another topic with your issue. But before you do that, you may want to do some investigation to see if other plugins might be affecting it.

    In my case, the issues that arose after upgrading past 4.1.1. was that newer versions make use of REST API, which is being blocked for non-authenticated users by another plugin (Clearfy).

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Courses page requires login since LP 4.1.2’ is closed to new replies.