User completion of h5p content causes PDOException

All, I'm having the following issue on my drupal 7 based site with H5P interactive content. This occurs at the ends of a lesson when the user clicks the green finish button on H5P presentation interactive content.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp) VALUES (:db_insert_placeholder_0, 

:db_insert_placeholder_1, :db_insert_placeholder_2, 

:db_insert_placeholder_3, :db_insert_placeholder_4, 

:db_insert_placeholder_5, :db_insert_placeholder_6); 

Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => application/octet-stream [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1531777949 ) in drupal_write_record() 

(line 7387 of /home/u47puwf29fqj/public_html/includes/common.inc).

Are there any known fixes or action I should take to resolve this? Or please share similar issues. 

Thanks, Dan

otacke's picture

Hi Dan!

It's an exception thrown in Drupal, so could you give us the "stack trace" maybe? There should be a tiny arrow next to the message which should expand some more information on clicking it. It will reveal the trace of functions causing the trouble.

Best,
Oliver

Thanks for your response Oliver, the problem was corrected. Drupal requires development of the interactive content to be built in lesson - quiz structure. Within the setting, there is an option to archive the users scoring record. I discovered that the file archive setting was causing this issue. Since this was a setting I didnt need, just shut it off. All is well again, until the next issue. 

BV52's picture

Hi Dan,

I'm glad you found the solution and thank you for getting back to us.

-BV52