Support » Plugin: Sensei LMS - Online Courses, Quizzes, & Learning » Users can’t “Take Course” or visit “My Courses” page

  • Resolved lnzhaotian

    (@lnzhaotian)


    The problems I noticed:
    1. When users click on the “Take Course” button, the page just reloads and there’s nothing changed.
    2. When users trying to visit “My Courses” page, only the header part is shown and the rest of the page is blank.
    Then I tried to track the problem, switched the debug mode on for wordpress and var_dump() the variables before the error occurs. I finally found the problem is with get_learner_term() in class-sensei-learner.php. Every time when this function is called, after this line:
    $term = wp_insert_term( $user_term_slug, Sensei_PostTypes::LEARNER_TAXONOMY_NAME );
    it throws this error:

    object(WP_Error)#8332 (3) {
      ["errors"]=>
      array(1) {
        ["term_exists"]=>
        array(1) {
          [0]=>
          string(36) "A term with the name provided already exists in this taxonomy."
        }
      }
      ["error_data"]=>
      array(1) {
        ["term_exists"]=>
        int(68)
      }
      ["additional_data":protected]=>
      array(0) {
      }
    }

    I’m not sure what to do next to fix it. Please give me some suggestions, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Cena (a11n)

    (@cena)

    Hi @lnzhaotian ,

    This sounds like a theme or plugin conflict.

    It’s possible that there might be a conflict with one of your current plugins or your theme.

    Try disabling all of your plugins except Sensei LMS (and any extensions). Then try testing again to see if the issue persists. If that resolves your issue, you can find what was causing it by enabling each plugin one by one while continuing to test.

    If that doesn’t help, you can also try switching to the Twenty Twenty theme via Appearance > Themes, and test again. If the issue is resolved then you know it’s a problem with the theme, and you’ll need to contact the theme author for further assistance.

    Let us know how it goes.

    Thread Starter lnzhaotian

    (@lnzhaotian)

    Hi @cena ,
    Thanks for your suggestions. I tried all of your suggested steps but it’s still not working.
    I disabled all the plugins and changed the theme to Twenty Twenty, but the problems were still there.
    I am still trying to find what went wrong.

    Thread Starter lnzhaotian

    (@lnzhaotian)

    I’m guessing if it is some part of the database related to Sensei LMS is damaged somehow?

    Plugin Support Cena (a11n)

    (@cena)

    Hi @lnzhaotian ,

    My apologies for the delay in responding!

    If you’re still having this problem, I’m not able to duplicate this on my test site: https://cloudup.com/cCwhM-q2OyP

    – pressing Take Course works as expected, and with WordPress debugging on, clicking the Take Course button generates no log entries (or errors in console.)

    Do you get any console errors? Do you have any custom code on your site, other than plugins or theme? If you set up a totally vanilla (ie, just Sensei and TwentyTwenty) staging site, does the problem persist?

    Best,
    Cena

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Users can’t “Take Course” or visit “My Courses” page’ is closed to new replies.