Embed not working
I upgraded to the latest H5P version today, and no embed codes are working. I can use any embed code created before the update, but if I try to embed the SAME activity by generating a new embed code, it does not work.
I am running this on a WordPress site on my desktop, with the latest version of WordPress installed. This problem happens no matter what browser I use, FireFox, Chrome, Opera or Safari. It happens with any content type. This is an example of the embed code:
<iframe src="https://englishiseasy.com.br/wp-admin/admin-ajax.php?action=h5p_embed&am..." width="958" height="2342" frameborder="0" allowfullscreen="allowfullscreen"></iframe><script src="https://englishiseasy.com.br/wp-content/plugins/h5p/h5p-php-library/js/h..." charset="UTF-8"></script>
otacke
Tue, 03/12/2019 - 00:58
Permalink
Hi pjwalker64!Special
Hi pjwalker64!
Special characters of the URL seem to replaced by their HTML encoded couterpart. In your example, the & in the URL was replaced by & and causes the problem. To work around this, you core re-replace the & with & to fix the URL.
I am not absolutely sure whether H5P is causing this, because I updated my WordPress instance, too, and everything still works nicely.
Best,
Oliver
pjwalker64
Tue, 03/12/2019 - 08:42
Permalink
Not Special character
Thanks for your reply,
I have one activity created after the update that is working (ID 200). However, I copied the content and pasted it into a new one (ID 209), and it does not work. Observe that both have the amp; character:
THIS ONE SAYS: CONTENT NOT AVAILABLE
<iframe src="https://englishiseasy.com.br/wp-admin/admin-ajax.php?action=h5p_embed&am..." width="958" height="642" frameborder="0" allowfullscreen="allowfullscreen"></iframe><script src="https://englishiseasy.com.br/wp-content/plugins/h5p/h5p-php-library/js/h..." charset="UTF-8"></script>
THIS ONE WORKING:
<iframe src="https://englishiseasy.com.br/wp-admin/admin-ajax.php?action=h5p_embed&am..." width="500" height="300" frameborder="0" allowfullscreen="allowfullscreen"></iframe><script src="https://englishiseasy.com.br/wp-content/plugins/h5p/h5p-php-library/js/h..." charset="UTF-8"></script>
otacke
Tue, 03/12/2019 - 12:20
Permalink
Hi pjwalker64!Strange. I hope
Hi pjwalker64!
Strange. I hope someone else on the forum can explain this then.
Cheers,
Oliver
pjwalker64
Tue, 03/12/2019 - 12:32
Permalink
Error log
This is the error log, which makes me think the problem is code-related:
Mar 12 01:08:48 192.168.208.92 apache2[19463]: [u1921] [englishiseasy.onpressidium.com] [173.255.231.224] [error] [pid 19463:rid ARnEVPM+wLE:tid 139898191197952] mod_proxy_fcgi.c(673): [client 192.168.181.230:50316] AH01071: Got error 'PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMI' at line 2 for query \r\n\t\t\tSELECT `id` FROM uVwcZRXn_uotincan_reporting\r\n\t\t\t\tWHERE `user_id` = AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hoo k->apply_filters, UCTINCAN\\Server->check_request, UCTINCAN\\Server->process_request, UCTINCAN\\Server->create_tincan_record, UCTINCAN\\TinCanRequest\\H5P->get_completion, UCTINCAN\\Services->check_h5p_completion_, UCTINCAN\\Database\\Completion->get_H5P_completion, wpdb->get_var, wpdb->print_error\n'
Mar 12 01:40:24 192.168.195.213 apache2[10661]: [u1921] [englishiseasy.onpressidium.com] [173.255.231.224] [error] [pid 10661:rid cWLOxdM1sEg:tid 140622597977856] mod_proxy_fcgi.c(673): [client 192.168.181.230:48566] AH01071: Got error 'PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMI' at line 2 for query \r\n\t\t\tSELECT `id` FROM uVwcZRXn_uotincan_reporting\r\n\t\t\t\tWHERE `user_id` = AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Ho ok->apply_filters, UCTINCAN\\Server->check_request, UCTINCAN\\Server->process_request, UCTINCAN\\Server->create_tincan_record, UCTINCAN\\TinCanRequest\\H5P->get_completion, UCTINCAN\\Services->check_h5p_completion_, UCTINCAN\\Database\\Completion->get_H5P_completion, wpdb->get_var, wpdb->print_error\n'
Mar 12 04:35:00 192.168.208.92 apache2[19463]: [u1921] [englishiseasy.onpressidium.com] [157.55.39.236] [error] [pid 19463:rid 4XxvJBY4wLE:tid 139898073700096] mod_proxy_fcgi.c(761): (70007)The timeout specified has expired: [client 192.168.181.230:48770] AH01075: Error dispatching request to : (polling)
Mar 12 09:24:39 192.168.208.92 apache2[6813]: [u1921] [englishiseasy.onpressidium.com] [45.33.65.168] [error] [pid 6813:rid Uo0YQmqqlrE:tid 139898442979072] mod_proxy_fcgi.c(673): [client 192.168.181.230:33954] AH01071: Got error 'PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMI' at line 2 for query \r\n\t\t\tSELECT `id` FROM uVwcZRXn_uotincan_reporting\r\n\t\t\t\tWHERE `user_id` = AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook-> ;apply_filters, UCTINCAN\\Server->check_request, UCTINCAN\\Server->process_request, UCTINCAN\\Server->create_tincan_record, UCTINCAN\\TinCanRequest\\H5P->get_completion, UCTINCAN\\Services->check_h5p_completion_, UCTINCAN\\Database\\Completion->get_H5P_completion, wpdb->get_var, wpdb->print_error\n'
Mar 12 09:38:12 192.168.208.92 apache2[6814]: [u1921] [englishiseasy.onpressidium.com] [45.33.65.168] [error] [pid 6814:rid KV+GcsqqlrE:tid 139898325481216] mod_proxy_fcgi.c(673): [client 192.168.181.230:43452] AH01071: Got error 'PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMI' at line 2 for query \r\n\t\t\tSELECT `id` FROM uVwcZRXn_uotincan_reporting\r\n\t\t\t\tWHERE `user_id` = AND\r\n\t\t\t\t\t`course_id` IS NULL AND\r\n\t\t\t\t\t`module` LIKE '%h5p_embed&id='\r\n\t\t\t\tLIMIT 1 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook-> ;apply_filters, UCTINCAN\\Server->check_request, UCTINCAN\\Server->process_request, UCTINCAN\\Server->create_tincan_record, UCTINCAN\\TinCanRequest\\H5P->get_completion, UCTINCAN\\Services->check_h5p_completion_, UCTINCAN\\Database\\Completion->get_H5P_completion, wpdb->get_var, wpdb->print_error\n'
icc
Tue, 04/16/2019 - 13:39
Permalink
Do you have a TinCan or xAPI
Do you have a TinCan or xAPI plugin enabled by any chance?
Try temporary disabling them and see if the error goes away.