We ran into this yesterday and it led to all kinds of other nonsense that wasn’t the issue. What was happening was that when you tried to Reuse>Download an existing H5P file it wouldn’t download it but would print the nonsense that is in the image above. We ended up going down all kinds of rabbit holes because we were also having an issue with permission and updating H5P libraries. Those issues weren’t related at all but did eat up some serious time. Those things tend to snowball and I end up adding a wheeluser in WHM so I can SSH into a sub-install and mess with folder/file permissions via terminal.1 Anyway, what interests me in some ways is that I finally gave up and posted for help on Twitter at 8:07 this morning. I hate to ask people for help if I haven’t worked pretty hard at solving something. Early in the hope game but I'm thinking it's a mime type issue. Not sure why it appeared suddenly though. — Tom Woodward (@twoodwar) September 22, 2020 By 9:00AM my brain finally kicked loose where I’d seen that weird code-like stuff before . . . expletive-string2 mime types. A bit of Stackoverflow later and I was able to add the following to the .htaccess file and fix the issue by […]
If you’re running the H5P plugin in WordPress, you might notice that there’s an advanced settings option when you go to embed it. If you click on that you’ll see an additional script to add to enable dynamic sizing of embedded H5P content. I wanted that but that option doesn’t make much sense in our environment. If you read this blog a lot and have an amazing memory, you’ll know I have a plugin that’s network activated where I put little things that make sense but don’t need their own dedicated plugin. This seemed like one that fits that bill. It’s really simple. It asks if the site is running H5P and if the answer is yes, it enqueues the h5p-resizer.js.