0

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?

Filburt
  • 17,626
  • 12
  • 64
  • 115
Jelmer Jellema
  • 1,072
  • 10
  • 16
  • 1
    Have you reported this issue to the developers of Learnpress yet? If not, it might be a good idea to do so. – cabrerahector Aug 24 '20 at 11:17
  • Yes I did. I posted it on the plugin's forum on wordpress. I stated this in my question, but unfortunately this was edited out by @Filburt. – Jelmer Jellema Aug 24 '20 at 11:32

0 Answers0