Moodle 2.5 repository_ajax.php tries to download in browser

Moodle 2.5 repository_ajax.php tries to download in browser

by Ali Hastie -
Number of replies: 4

Just upgraded from 2.4.3 to 2.5 this morning.   

Within Internet Explorer 10 I try I try to upload a file (any file type) through the file resource.  When I browse for the file and then upload the file, and I am asked if I want to open or save repository_ajax.php

The above procedures uploads the files with IE 8/9 and Firefox.

Cheers

Average of ratings: -
In reply to Ali Hastie

Re: Moodle 2.5 repository_ajax.php tries to download in browser

by Tiffany Morgan -

We just upgraded this morning to 2.5. Had the message to save the php file when using IE8. When I tried uploading via Firefox I didn't get the ajax message and my file uploaded correctly.

In reply to Tiffany Morgan

Re: Moodle 2.5 repository_ajax.php tries to download in browser

by Lawrence N -

Try this hack in the repository_ajax.php file

Looks like "@header('Content-type: text/html; charset=utf-8');" is missing in version 2.5

under line 59, add @header('Content-type: text/html; charset=utf-8');

....

line 59 echo $OUTPUT->header(); // send headers

line 60 (add this) @header('Content-type: text/html; charset=utf-8');

....

 

It works with 2.2+ and I noticed that "@header('Content-type: text/html; charset=utf-8'); is missing big grin

I will report it to moodle ...

In reply to Lawrence N

Re: Moodle 2.5 repository_ajax.php tries to download in browser

by Lawrence N -
In reply to Lawrence N

Re: Moodle 2.5 repository_ajax.php tries to download in browser

by Damien Hogan -

I am getting the same issue in Moodle 2.4 on Chrome & Safari. Has a bug been reported for 2.4 as well? If not how can I go about doing so?