We tried to replicate the issue on our site with LiteSpeed cache, but we are unable to do so. We recommend the same plugin for other users, but they have not faced such an issue.
Also, the learn page shows a build with Divi. If you have customized the page, we highly recommend that you make it blank and do not modify it via any page builders.
If the LiteSpeed cache continuously affects your site, we have also recommended other cache plugins. You can try other cache plugins as well to make your site smoother.
Please let me doubt your issue replication skills… π
My web host uses LiteSpeed Web Server, so I get huge benefits by using their plugin.
Again, the steps to reproduce the issue:
Install WordPress
Install Masteriyo
Install LiteSpeed Cache
Disable caching for the Learn Page and add the Excludes > Do Not Cache URIs
Create a course and a Quiz
Log out > Delete the browser cache
While being logged out, start a course and go to the quiz part.
Here’s a demo of my first Masteriyo website. It currently uses older versions (WP v6.2.3, Masteriyo v1.7.2 & LiteSpeed v6.0.0.1). I kept this on purpose, because it worked fine!
Start Course, go to the Quiz and hit Start Quiz. As you can see, it works fine there.
Now, do the same on my latest website, which uses the latest plugins (WP v6.5.4, Masteriyo v1.11.1 & LiteSpeed v6.2.0.1).
Can you see it now? π It worked before (older versions) and it doesn’t work now.
With all due respect, that’s why I’m doubting your issue replication skills.
PS: Both websites use the same hosting and mostly the same plugins.
The only way to fix it, is to completely disable the LiteSpeed Cache plugin.
We have followed the same process in our multiple testing environments, but we are unable to find such an issue. Since the cache management is from the LightSpeed cache, have you contacted plugin support for this issue? Maybe the caching-specific page feature for non-logged-in users is not working.
To me, it’s weird the fact that you can’t reproduce this, as I’m having the exact issue, on multiple sites, but I can’t tell if it happened after a Masteriyo, or a LiteSpeed Cache update.
However, I tend to believe that Masteriyo is the culprit here, because of the following:
The quiz page when the user is not logged in:
As you can see, the browser reports that the page is indeed uncached.
Now, the HUGE issue is that I’ve completely disabled LiteSpeed Cache plugin, but I still can’t access the quiz…
EDIT: Some more testing. I set the LiteSpeed cache preset to Basic, and in Page Optimization > CSS/JS Settings, I disabled everything, and for a minute it worked. Now, it broke again…
And I now see this:
Deleted LiteSpeed completely on this website. Please let me know if you can start this quiz. π
I tested both logged out and logged in, in the following scenarios:
LiteSpeed Cache Uninstalled – Issue fixed, works fine.
LiteSpeed Cache Installed > Advanced Preset enabled – Same issue. To fix it, I had to also disable Cache REST API in the Cache Control Settings. So you need to update the note in your documentation, for users to also disable the REST API caching.
You can safely apply the new code in \includes\RestApi\Controllers\Version1\QuizAttemptsController.php in your next version.