Details
Assignee
UnassignedUnassignedReporter
Oliver TackeOliver TackePriority
Medium
Details
Details
Assignee
Unassigned
UnassignedReporter
Oliver Tacke
Oliver TackePriority
Created February 14, 2024 at 11:13 AM
Updated April 22, 2024 at 1:22 PM
Acceptance criteria
If the H5P integration does not set H5PIntegration.editor.fileIcon properly, the editor does not crash.
Background
H5P core requires the H5P integration to specify a “binary” file icon and set it properly in H5PIntegration.editor.fileIcon. If the H5P integration does not do that (e.g. the H5P CLI server currently), and the author tries to upload some “binary” file, e.g. a VTT file as a track in H5P.Video, the editor crashes in https://github.com/h5p/h5p-editor-php-library/blob/master/scripts/h5peditor-file.js#L264.
See e.g. https://github.com/h5p/h5p-wordpress-plugin/blob/0510e44b2ee55f70042a2532d04ddd45d8a6d249/admin/class-h5p-content-admin.php#L1035-L1039 for the proper structure of the
fileIcon
property that an H5P integration is supposed to set.Suggestion
Merge to add a fallback (the image that all H5P integrations use anyway).