Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported H5P Interactive Book fails to load after editing: JSON.parse: unexpected character at line 1 column 1 of the JSON data #158

Closed
csidirop opened this issue Jul 30, 2024 · 3 comments

Comments

@csidirop
Copy link

After importing an H5P Interactive Book export and subsequent editing, it is no longer loaded:
grafik

The browser console displays following error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    base64ToJsonString https://ilias.uni-mannheim.de/Customizing/global/plugins/Services/Repository/RepositoryObject/H5P/templates/js/h5p.adapter.js?version=8_13&vers=8-13-0-03:140
    initContent https://ilias.uni-mannheim.de/Customizing/global/plugins/Services/Repository/RepositoryObject/H5P/templates/js/h5p.adapter.js?version=8_13&vers=8-13-0-03:120
    <anonymous> https://ilias.uni-mannheim.de/ilias.php?baseClass=ilobjplugindispatchgui&cmdNode=pj:nq:dw&cmdClass=ilH5PContentGUI&cmd=showContents&ref_id=1527245:1341
    addOnLoad https://ilias.uni-mannheim.de/Services/JavaScript/js/Basic.js?version=8_13&vers=8-13-0-03:47
    jQuery 13
ilias.php:1347:42

I can reproduce this behaviour on my own local instance with Ilias r_7 & r_8. Unfortunately, no entry is written to the log. This happens every time regardless how complex the IB is.

How to reproduce:

  1. Create new IB
  2. Add at least one content & save it & test if it works
  3. Export it & delete it
  4. Import it & test if it works
  5. Edit the content and add eg. one additional page with one content element
  6. Test it -> Error!

Its usually is enough to add one multiple choice or fill in the blanks task. And the same after importing it.

@otacke
Copy link

otacke commented Jul 30, 2024

@csidirop That error is thrown in the ILIAS plugin. Since that H5P integration is not maintained by H5P Group, you should probably reach out to Studer&Raimann who built the plugin.

I am not ruling out an issue on H5P's side, in particular since Interactive Book has custom URL handling that doesn't comply fully with web standards. But that would be step #2.

@csidirop
Copy link
Author

csidirop commented Jul 30, 2024

Okay I'll do that.

Ticket: SUPPORT-15209

@csidirop
Copy link
Author

csidirop commented Dec 6, 2024

The bug seems to be fixed with one of the latest plugin versions!

@csidirop csidirop closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants