Editor: Waiting for Javascript...

Editor: Waiting for Javascript...

by Roy Jensen -
Number of replies: 12

My institution upgraded to Moodle 3.11.6+ (Build: 20220318) last fall. Since then, everything has been working fine. 

I am the first to use H5P, and am using core. Right now, I am getting an indefinite "Waiting for Javascript..." error while trying to add Interactive Content. I haven't found a solution.

Presented below are the error message and the H5P settings. (I am not IT, but have admin access.)

Your assistance getting this working would be greatly appreciated!

Thx



 
Average of ratings: -
In reply to Roy Jensen

Re: Editor: Waiting for Javascript...

by Joseph Rézeau -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

"I am the first to use H5P, and am using core. "

Your screenshot shows that you are not using the core Moodle H5P activity but you are using the H5P external plugin.

In reply to Joseph Rézeau

Re: Editor: Waiting for Javascript...

by Roy Jensen -
"Your screenshot shows that you are not using the core Moodle H5P activity but you are using the H5P external plugin."

Would you please direct me to resources that explain how to activate H5P core and disable the plugin?

Thx
In reply to Joseph Rézeau

Re: Editor: Waiting for Javascript...

by Roy Jensen -
Tried to add content to the Content Bank. Get this indefinitely.

In reply to Roy Jensen

Re: Editor: Waiting for Javascript...

by Oliver Tacke -
Picture of Particularly helpful Moodlers
Hi Roy!

Could you please share what the development console is showing when nothing happens? Otherwise it is unfortunate a little like posting a photo of a car and asking why it is not driving smile

On most browsers, you can open the development tools by pressing F12 (different on desktop Safari, you may need to activate the dev tools) and and you should find a button labeled "console" if it's not open right away.

It's interesting that both moodle's integration and the official integration show similar behavior, because they don't share libraries. Please share the dev console contents of both.

Best,
Oliver
In reply to Oliver Tacke

Re: Editor: Waiting for Javascript...

by Roy Jensen -

Oliver

Thanks for the suggestion. Attached as images. Obviously, the H5P Editor is not defined.

I'm looking for this as you read this, but pointing me in the correct direction would be GREATLY appreciated.

Attachment Capture 1.jpg
Attachment Capture 2.jpg
In reply to Roy Jensen

Re: Editor: Waiting for Javascript...

by Oliver Tacke -
Picture of Particularly helpful Moodlers
Hi Roy!

The two error messages above are the interesting ones and most likely causing the rest. Something on your system seems to cause problems in H5P core which explains why you encounter the issue in the plugin and in moodle's integration.

It seems that on moodle the code gets minified, so the line of code that's displayed alone doesn't tell anyone where to look further. Could you please click on "h5p.js:382:328“. That should open the source code (which is probably minified, so one loooong text without spaces or decent line breaks). There should be a button labeled "{}" which should unminify the code on clicking, and then the exact position of the code where the error happens should be highlighted. That's what should point into the direction where the actual cause is.

The error message itself seems to be PHP related though, so if you by any chance have access to the server's PHP error log, having a look there might help as well.

Best,
Oliver
In reply to Oliver Tacke

Re: Editor: Waiting for Javascript...

by Roy Jensen -
Hello Oliver

Thanks for getting back to mo. Attached is the section you request. Highlighted is line 8 -- the error location.

I do not have access to the server directly, only admin access on Moodle.

If you want to do this interactively, we can meet on Zoom. Then I can inform IT of the issue.

Thx
In reply to Roy Jensen

Re: Editor: Waiting for Javascript...

by Oliver Tacke -
Picture of Particularly helpful Moodlers
Hi!

That's not the JavaScript source code but the page's HTML source code, but it's linked to https://github.com/h5p/h5p-php-library/blob/master/js/h5p.js#L384

You can see that the code that Piwik (a web traffic analysis/tracking tool) adds/injects at some point seems to throw off H5P. H5P is not the source of that Piwik code.

I can't tell you what exactly is happening (in particular because I don't know Piwik or Matomo as it is called nowadays in detail) and a live session would not help. That's something that your platform's admin might need to have a look into. Potentially, it's enough to remove the line breaks in the extra code that Piwik adds.

Best,
Oliver
Average of ratings: Useful (1)
In reply to Roy Jensen

Re: Editor: Waiting for Javascript...

by Joseph Rézeau -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

@Roy,

Could you please post a detailed step-by-step?

When you go to the Content Bank in your Moodle course, and click the Add button, which H5P content/activity do you select? Are you unable to add any or all of the H5P activities listed in the available list?

 

In reply to Joseph Rézeau

Re: Editor: Waiting for Javascript...

by Roy Jensen -
Joseph

Dashboard > Site pages > Content bank

It doesn't matter what I try to add, I get the following image.  I see the full array of H5P modules, but can add nothing.
I have tried Interactive video, Audio, Course presentation, Multiple choice.

If you have a simple H5P application to upload -- one that you know works -- I can try that. (My email is in my profile.)

Also if you want to meet on Zoom, we can go through the configuration in real time.

In reply to Roy Jensen

Re: Editor: Waiting for Javascript...

by Przemek Kaszubski -
Picture of Particularly helpful Moodlers Picture of Testers
My thoughts:
  • The Dashboard's Content Bank = Site-level Content Bank IMO - you might not have permissions to add here.
  • Try the same from within a course (as instructed earlier) ?
  • Link should then be to https://<yoursite>/contentbank/index.php?contextid=<course_context_number_other_than_1> - cf attached screenshot
  • contextid should not be 1 (which is site / front page context)
Maybe this is relevant to your problem. Regards.


Attachment 2022-05-15 , 12_08_15 - Course_ H5P Tests - 2021-11-07 — Mozilla Firefox.png
In reply to Przemek Kaszubski

Re: Editor: Waiting for Javascript...

by Roy Jensen -
No difference.
 
I did discover that the H5P Editor is not defined. Any hints on defining it?

Your assistance is much appreciated!
Attachment Capture 1.jpg
Attachment Capture 2.jpg