Support » Plugin: LearnPress - WordPress LMS Plugin » Unable to save quizzes or questions

  • Resolved mattchristensen

    (@mattchristensen)


    I’m getting the following error on the admin side of my quizzes page when I try to edit or add something:
    quiz-editor.js?nocache=1538086220.0959&ver=3.0.12.1:937 Uncaught TypeError: $ is not a function

    Getting this error on the questions admin page:
    question-editor.js?nocache=1538086891.0771&ver=3.0.12.1:261 Uncaught TypeError: $ is not a function

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mattchristensen

    (@mattchristensen)

    Well, I’m going to answer my own question here. I basically wrapped all of the lines with the $ in it with the following function:

    jQuery(function ($) { 
      // code goes here
    });

    Everything is working now. Please add this to your code so it won’t break my site next time you update.

    Just for reference in the quiz-editor.js file, lines 937-939 and 974-978 need to be wrapped. Also question-editor.js lines 261-263 and 298-302 need to be wrapped.

    Plugin Contributor Ken Nguyen

    (@kendy73)

    Thanks mattchristensen,

    Our team is checking this more carefully and we will make a necessary update for this.

    Thread Starter mattchristensen

    (@mattchristensen)

    Thanks Ken!
    I checked your GitHub earlier and it looks like someone already created a solution for those two files, albeit two different ways of fixing it in those two different files.

    Plugin Contributor Ken Nguyen

    (@kendy73)

    The next version will include that fix. Thank you for the report 😉

    I updated to version 3.1.0.1.
    but I can’t save the quiz question. I also cannot select a question from the list.

    here is a mistake:
    https://drive.google.com/open?id=1aFYNpw1H93rHeGCymdLkEb8sy6fUEDUr

    Thanks, the question is removed. update wp to 4.9.8 helped

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unable to save quizzes or questions’ is closed to new replies.