Results not stored in db
Submitted by mondos on Sat, 05/27/2017 - 14:16
I have the following problem using the WP plugin:
The results of any content are not being stored when a logged-in user do, for example, a Fill in the blanks test.
But, when testing the content as Admin in the admin panel the results ARE stored.
I have a local installation and it works perfect, both for users and Admin.
The only difference is that the production server runs in HTTPS and my local no.
I have uninstall completely H5P plugin and re-install again latest version (1.83) and the problem is still there.
Please any advice will be greatly appreciated.
Sat, 05/27/2017 - 21:02
Try opening the console in
Try opening the console in your browser (Ctrl+Shift+J in Chrome) and then go to the network tab. When answering a task a new request should appear. Check the request to make sure that the URL is correct. There could be an issue with the URL if the one configured in WordPress (wp-config.php) doesn't match the real one. Also, try checking your web server's error_log file for any potential issues.
Sun, 05/28/2017 - 08:02
Thank you for the answerr @icc!
Ths solution was simple but strange. My hosting is wpengine.com and by default, the admin side of the Wordpress is under HTTPS, but not the front unless you specify it. So the requests done by H5P were calling wp_ajax in HTTP not in HTTPS.
I have forced the site to be in HTTPS and now it works perfect.
Thank you very much,
Sun, 05/28/2017 - 15:02
Great to hear that you got it
Great to hear that you got it working, and thanks for sharing the solution!