How to turn on debugging?
Submitted by user2352352 on Thu, 11/23/2017 - 01:36
Forums:
Hi,
I'm getting this error in h5peditor.js when trying to open course presentation, but only in one of our wordpress envs.
TypeError: t is undefined
h5peditor.js:1747:7881
How can I turn on debugging in h5p to try and trace the origin of this problem?
It's happening when trying to create a new course presentation or when editing an existing cp.
Thanks
Content types:
user2352352
Thu, 11/23/2017 - 01:44
Permalink
The type error may be a 'red
The type error may be a 'red herring'. My main problem is that course presentation isn't loading. I get the Loading, please wait... message. I don't mind stepping thru with the debugger in Firefox but I don't know where to start. Just wondering if there's a variable we can set in h5p to output some verbose console logging, or if there's a smart place to insert a debugger pause in h5peditor.js
thomasmars
Thu, 11/23/2017 - 13:09
Permalink
Hi,It seems like some of your
Hi,
It seems like some of your JavaScript is not loaded. The t() is used for translating texts, and can be found in h5peditor-editor.js.
Have you done any changes to the H5P plugin code ? Or could you have some other modules that are interfering with the code.
My first steps for debugging this would be to check that the h5peditor-editor.js file is loaded properly before this is called and if it isn't try to figure out why.
There is no debugging mode for H5P, the scripts are concatenated but not minified, so you should be able to put your breakpoints or 'debugger;' statements and step through functions to see why the function is not defined or where it is overwritten.
Unfortunately it is not easy to see what is going on here without any further information.
Please let us know what you figure out. Good luck,
Thomas