Results not stored in db

Hi all,

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.

Thanks,

 

Daniel

 

icc's picture

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.

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,

Daniel

icc's picture

Great to hear that you got it working, and thanks for sharing the solution!