Learnpress: check answer and hint do not work when not enrolled

512 views Asked by At

For a client, we have set up Learnpress so they can add some small courses to their site (“microlearnings”). These are free courses, no enrollment required. They uses quizzes.

Now, for a logged on user (a wordpress user) this works fine: you answer a question, you can use check answer (‘controleer’) or hint and this works (through post, by the way, not ajax or anything).

But the behavior does not work for not logged in users. The buttons “controleer” (check answer) and hint create a reload.

Things I see that happen:

The debug log gives this error only when the buttons are used for not logged in users:

PHP Notice: Undefined offset: 0 in /home/sites/h/XXX/web/wp-includes/class-wp-query.php on line 3284

Followed by a lot of lines with:

PHP Notice: Trying to get property 'post_type' of non-object in /home/sites/h/XXX/web/wp-includes/class-wp-query.php on line 4171

So apparently some wp_query fails but this is not checked.

Also: with wordfence enabled, I get locked out after a few tries, because of too much requests for non existent pages.

I tried disabling wordfence, but this did not solve the problem.

Anyone any idea?

0

There are 0 answers