Imported content from Moodle stored as text/plain instead of text/html

Bug #1026275 reported by Darren James Harkness
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Mahara
Triaged
Low
Hugh Davenport

Bug Description

When configuring a Mahoodle install, exported content from forum, blog, and wiki modules appears to be stored in Mahara's database (in artefact_file_files) with the filetype text/plain, rather than text/html. This prevents users from embedding the imported content as an HTML artefact within a page in Mahara (it instead has to be added as a downloadable file).

This appears to be finfo() working as expected, reading the contents of the file and not seeing opening HTML tags; however, downloading imported content from the incoming folder in Mahara and re-uploading it appears to properly set the mimetype correctly to text/html with no change to the file's contents.

Version information:
Moodle 2.2.1
Mahara 1.5.1

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

Hi Darren,

I believe this was fixed in Bug #774684, though that was specific to Ubuntu I believe. Can you please give some more information about your setup such as what OS, Web server, Database, etc.

Cheers,

Hugh

Changed in mahara:
status: New → Incomplete
importance: Undecided → Low
assignee: nobody → Hugh Davenport (hugh-catalyst)
Revision history for this message
Darren James Harkness (darren-athabascau) wrote :

Hi Hugh,

This is on RHEL6 running Apache 2.2.15, PHP 5.3.3 and MySQL 5.1.61.

Revision history for this message
Darren James Harkness (darren-athabascau) wrote :

I built a specific test case for the behaviour of both finfo() and mime_content_type() on RHEL6 and OS X 10.8, and it looks like this is something specific to RHEL6.

On OS/X 10.8, a downloaded post.html file reports the following mime type:
"text/html; charset=us-ascii"

On RHEL6, it reports this:
"text/plain; charset=us-ascii"

Here's a dir listing of /usr/share/misc in case it helps you track down the issue:

[darren@ ~]$ cd /usr/share/misc
[darren@ misc]$ ls -l
total 2348
-rw-r--r-- 1 root root 596741 Sep 5 2011 magic
-rw-r--r-- 1 root root 1794600 Sep 5 2011 magic.mgc

Revision history for this message
William Mair (wmair) wrote :

I have this problem too using Ubuntu Linux 10.10, on a PostgreSQL DB (v 8.4.11).

I've looked in the database and the filetype is showing as text/plain.

Any suggestions or anything else I can find out to help?

Thanks

Revision history for this message
William Mair (wmair) wrote :

Using Moodle 2.3.1 and Mahara 1.5.2, if that helps

Changed in mahara:
milestone: none → 1.6.0
Changed in mahara:
milestone: 1.6.0 → none
Changed in mahara:
status: Incomplete → Triaged
milestone: none → 1.7.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.7.0 → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8rc1 → 1.8.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0 → 1.8.1
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.1 → 1.8.2
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 1.8.2 → 1.8.3
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.3 → 1.9.2
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 1.9.2 → 1.9.3
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

I think this is fixed with bug #1318995

Revision history for this message
Darren James Harkness (darren-athabascau) wrote :

Hi Kristina - I happen to be just doing a test deploy of 1.9.2 and will test to confirm.

Revision history for this message
Darren James Harkness (darren-athabascau) wrote :

Can confirm this is fixed on RHEL.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hello Darren,

Thanks for confirming that the other fix also fixed your issue.

Cheers
Kristina

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.