Jump to content

Recommended Posts

Posted

Hi! I'm troubleshooting a very intricate online lesson, basically developed as a single-page-application before SPAs were cool (it sorta works even in IE6, if that tells you anything). When we pushed a test template to the third party LMS, it spat errors - wasn't able to run scripts, couldn't find XML, etc. They're very busy, and can only push test packages once every few weeks. So I was delighted to get the same errors when I pushed the template to my TCH domain (HURRAY! I can troubleshoot!).

 

The fix was to replace ALL of the relative paths - downward and upward - with absolute paths from root / .

 

My question is, is it because of the spaghetti code that the package is running, with JavaScript and XML here, there and everywhere, or is it a general policy, and we can't use relative paths at all? I'm cool either way; I just thought somebody might know off the top of their head, and save me some poking around.

 

Thank you so much!

 

~ Rosanne

Posted

Hi Rosanne,

 

Relative paths should work just fine on our servers, I personally tend to us nothing but relative paths. You can run into problems with them depending the requirements of specific scripting language s or have some hard-coded paths in your code that do not match the new location. If you have some examples of the paths used and from what directory, we can try to guide in you the right direction.

Posted

I'll see what I can come up with as an example - Thanks! It was interesting to me, that the LMS server had the same errors, but our local PHP server on the closed training network launched it with no problem. We could also launch via UNC.

 

:-)

Posted (edited)

Okay, here we go.

 

Absolute:

http://itu.grassrose.net/absolute/newStartup.html

 

Relative:

http://itu.grassrose.net/relative/newStartup.html

 

It's still very much an ugly baby at this point, and needs to be opened in Internet Explorer (sorry), otherwise video pages will lock you up. But the relative path version won't launch at all. As I said earlier, it WILL launch from UNC and from our closed network PHP server. I wonder if it's a path problem in the little bit of Flash that we have left in the core... the LessonLoader and LessonUpdater

 

I'm going to try updating those HTML ref pages and pushing them. I don't have the source files here at home, so I can't check that this evening.

 

Edited to add: didn't work; changed them back.

Edited by Rosanne
Posted

Try removing the leading slash in your swfobject, like this one "/LessonLoader.swf". That leading slash makes it refer to the root of the site and not the root of the document directory. The other stuff I am seeing appears to be hard-coded into the .swf itself and is attempting to call some images that I can't locate. If the .swf file itself is using a leading slash as well, this may be the source of your issues.

 

You can try placing a copy of the relative setup in the root of the itu sub-domain, and see how it loads.

Posted

Thanks! I've double-checked and confirmed with the original author (who has since retired) that the lesson is calling those SWFs unnecessarily - they're only needed on our standalone network, to handle our nonstandard CMI. I'll comment out the refs entirely tomorrow, and see how it works. Thanks for reminding me about the root directory - I made those subfolders this evening, and wasn't thinking about how that changed the paths. I thought I launched the absolute one afterwards, though. Hmmm.

 

Anyway, I really appreciate your help!

Posted

I finally had a chance to get back to this, and I'm going to go beat my head against a wall, now. The entire problem was due to ONE LETTER not being capitalized in an XML filename. Our folders don't care - we can launch from a network share, and it'll read fred.xml, Fred.xml or FRED.xml. Not so, from a Web server. At least, not these Web servers (and most likely, not from the LMS server, since it generated the same error message.

 

That error has probably been around since the dark ages of this template - it never manifested, because we don't have a real web server to test on. We always launched from network folders.

 

Sigh... thank you so much for your help.

Posted

Ah, that is because Linux systems are case sensitive. I didn't see that or would have mentioned it, just glad you were able to find the issue.

Posted

You would not BELIEVE the ragging I'm getting, from my Linux and UNIX friends. In my defense, I didn't write the original code. It still took me way too long to figure it out, though. By chance, when I tried the absolute paths, I typed the filename correctly, replacing the bad line. So it worked. By chance.

 

Ah, well. Back to work. :dance:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...