Link to File: Uploaded Word HTML files not showing

Link to File: Uploaded Word HTML files not showing

by Adam Jacobi -
Number of replies: 12
Greetings,

Whenever I try to link to an HTML file created in Microsoft Office (Word), all I get is a blank screen when the resource is supposed to load. I have tried other HTML files, and they work fine. I tried "cleaning" the file HTML in Dreamweaver, but that still didn't work.

These files all used to appear, but I think they stopped working after I upgraded to the most current version of Moodle.

I have attached a sample document.

Help, please?
Average of ratings: -
In reply to Adam Jacobi

Re: Link to File: Uploaded Word HTML files not showing

by Adam Jacobi -
Here's another file -- not created in Microsoft Word (from what I can tell) -- that is demonstrating the same behavior (not showing).
In reply to Adam Jacobi

Re: Link to File: Uploaded Word HTML files not showing

by Jim McGregor -

We have just yesterday resolved a whole bunch of similar issues in our 1.6.5. In \file.php in the root folder we changed this line (near the top):

$lifetime = 86400;     // Seconds for files to remain in caches

to 180.  This has fixed MS Office docs and pdfs.

I also inserted this into config.php:

// Seconds for files to remain in caches. Decrease this if you are worried
// about students being served outdated versions of uploaded files.
$CFG->filelifetime = 180;

I haven't had a chance to see if it's one or both together that sorted it.

In reply to Jim McGregor

Re: Link to File: Uploaded Word HTML files not showing

by Adam Jacobi -
Hi Jim -- thank you for your prompt response and assistance. I tried both steps to no avail with 1.8.2.

Still perplexed...
In reply to Adam Jacobi

Re: Link to File: Uploaded Word HTML files not showing

by Kirsten Ellis -
Hi jim !
i saw that you had similar issues with uploaded file links not showing as a resource. Did you by any chance find any solutions?
thanks
kirsten
In reply to Adam Jacobi

Re: Link to File: Uploaded Word HTML files not showing

by Adam Jacobi -
Can anyone help?
In reply to Adam Jacobi

Re: Link to File: Uploaded Word HTML files not showing

by Kirsten Ellis -
did you by any chance find a solution to the resource link issue?
absolutely no one has replied.. getting a bit discouraged with this odd problem.
Kirsten
In reply to Kirsten Ellis

Re: Link to File: Uploaded Word HTML files not showing

by Steve Hyndman -

This is a very old problem, particularly when linking to word documents using the "Link to file or Web site" resource. I had lots of problems with this a couple of years ago on a site I use for student eportfolios and got tired of fighting with it, so I ended up hacking out the "Link to file or Web site" resource option on that site. You can do everything with a Label that you can do with "Link to file or Web site" anyway, and the problem doesn't seem to happen when using labels to add the links. It's also not a problem when displaying files in a directory...at least not on my sites.

Steve

In reply to Kirsten Ellis

Re: Link to File: Uploaded Word HTML files not showing

by Arnaud Saint-Georges -
Bonjour Kirsten,

I had the same issue. By renaming or duplicating the file, it works fine again.
So I think that may have to do with some caches, in addition to a conflict with MS HTML headers.
Did you test to reload the file from the Moodle server? (<Ctrl> + <F5>)?
If OK, you can suggest to your users to unset their browser cache.
Arnaud
In reply to Adam Jacobi

Re: Link to File: Uploaded Word HTML files not showing

by John Isner -
What version of Moodle are you using? I repeated your experiment on demo.moodle.org (running Moodle 1.8.2+) and it works just fine. Here is what I did:
  • upload your file to the "features" course
  • create a new resource of type "Link to file or Web site" which links to the uploaded file
When I click the resource link, the page displays without any problems.

I suspect your problem has nothing to do with this file. Are you able to display other html pages (e.g., a simple one created by hand)?
In reply to John Isner

Re: Link to File: Uploaded Word HTML files not showing

by Tarmo Sildeberg -
Hi,

I am using Moodle 1.7.2 and I have exactly the same problem. I upgraded from 1.5.4 (everything worked there) and now most of the htm files are not appearing. I checked the permissions - they are fine. I recreated a htm file with Macromedia and it worked.

I uploaded a not working htm file to demo.moodle.org and it worked there.

Does anyone have an idea what to do next? I do not want to remake all the htm files and I believe that moodle should show the htm files made with ms word as well

regards,
Tarmo Sildeberg
In reply to Tarmo Sildeberg

Re: Link to File: Uploaded Word HTML files not showing

by Roger Emery -
I had a similar problem with a load of html files that were brought over from our old Learnwise system.
It seemed to be files created with MS word or Frontpage and that had a couple of return characters and blank lines at the bottom of each file. Removing these 'empty' lines fixed the problem.
However I don't think the lines were actually empty - I thinkt hey were some odd non-displaying characters (ie ASCII values out of the normal alpha-numeric and symbol range)
The files worked fine of the old Learnwise Windows/ASP server.

I've got a feeling they were doing something similar to inserting blank lines after a closing php tag, but never really found out for sure what was happening.

check your files have no empty lines after the closing HTML tag.


In reply to Adam Jacobi

Re: Link to File: Uploaded Word HTML files not showing

by John Isner -
I uploaded your html file to demo.moodle.org (currently running 1.9 beta 3) and linked to it from a "Link to file or Web site" resource. The page displayed without any problems, either in the same window or in a new window. I experimented using Firefox and Internet Explorer with the same result. I am puzzled why it is not working for you. I doubt that it is related to caching, but just in case, did you try clearing your browser cache?