HYPE-664.thin.min.js file not loading

Hi,

Getting a strange issue with some of the hypes I export.

The hype_generated_script.js loads just fine, it uses the path in the html, however the HYPE-664.thin.min.js (in the same folder as is standard) is not loading as it usually does (404’ing). It seems to just be appending on to the current url instead of following the root folder like the main js file does.

Most hypes are fine, in very similar folder structures

Anyone else run into this issue?

Not sure what that might be — might want to check the permissions on the file after you upload it?

Not sure what this means? Can you send a screenshot or console logs?

rootdomain is just a placeholder to obfusticate the real url

URL of the page hype is on:
rootdomain.com/user/course/understanding-attention-deficit-hyperactivity-disorder/course-section/interventions/managing-adhd-in-the-classroom

URL of the hype_generated_script.js file (as is loaded in the html):
rootdomain.com/content/hype/courses/attention-deficit-hyperactivity-disorder/Interventions/ManagingADHDintheclassroom.hyperesources/ManagingADHDintheclassroom_hype_generated_script.js?25521

However the console errors the while loading the HYPE-664.thin.min.js :

ManagingADHDintheclassroom_hype_generated_script.js?25521:3 GET https://rootdomain.com/user/course/understanding-attention-deficit-hyperactivity-disorder/course-section/interventions/ManagingADHDInTheClassroom.hyperesources/HYPE-664.thin.min.js net::ERR_ABORTED 404 (Not Found)
k @ ManagingADHDintheclassroom_hype_generated_script.js?25521:3
m @ ManagingADHDintheclassroom_hype_generated_script.js?25521:5
(anonymous) @ ManagingADHDintheclassroom_hype_generated_script.js?25521:31
(anonymous) @ ManagingADHDintheclassroom_hype_generated_script.js?25521:31

As you can see above, URL it tries to load for HYPE-664.thin.min.js:
rootdomain.com/user/course/understanding-attention-deficit-hyperactivity-disorder/course-section/interventions/ManagingADHDInTheClassroom.hyperesources/HYPE-664.thin.min.js

Usually it would attempt to load:
rootdomain.com/content/hype/courses/attention-deficit-hyperactivity-disorder/Interventions/ManagingADHDintheclassroom.hyperesources/HYPE-664.thin.min.js

Hope that makes sense!

Hype typically expects the .hyperesources folder containing the *_hype_generated_script.js and the HYPE-NNN.thin.min.js runtime file to be placed next to the .html that is loading it. The *_hype_generated_script.js itself stores the name of the .hyperesources folder to combine to load the HYPE-NNN.thin.min.js file; it is probably just trying to load “./ManagingADHDInTheClassroom.hyperesources/HYPE-664.thin.min.js”.

Of course in the real world there’s tons of cases where the .hyperesources folder may not be next to it, such as what you have done. I assume you have edited the src of the <script> tag that calls the *_hype_generated_script.js file?

Because this is common, the *_hype_generated_script.js file itself will attempt to find the full URL of its .hyperesources folder and use that instead of just the relative path. From the 404 you’re getting, it sounds like this full script path search is failing in some way. So it is falling back to assuming the .hyperesources folder is next to the .html. I’d need to see your src value and probably see the document on the live server to figure out why it cannot find the full path and give a recommendation.

In lieu of that, the easier solution may be to use an iframe that calls to a simple .html file (like the default exported one) in a spot that is next to a .hyperesources folder.

I realize this is hard to explain in a post, but hopefully that makes sense? :slight_smile:

Turns out it was an issue with there being too many capitals in the hype name?

Changing the src from: ManagingADHDInTheClassroom to managingadhdintheclassroom fixed it…

Thanks anyway

2 Likes

That would also explain it! Most systems are case sensitive; macOS file systems by default are case preserving but not case sensitive. This can often introduce issues when there are case typos and sites go onto production servers.