Forums | Mahara Community

Support /
Mahara 1.1.4 / some "errors"(?)


anonymous profile picture
Account deleted
Posts: 73

12 June 2009, 5:19

Hi,

I upgraded to Mahara 1.1.4. and noticed some issues that might be errors (independent of the theme used):

--  uncheckking all(!) File Types in section "Plugin Administration" / "Plugin type: blocktype" / "file/internalmedia (Config)" leads to an error in section "Profile" / "Edit profile page" / "Files, images and video (6)"  while trying to embed "Embedded Media"

Error message is:

Failed to get a recordset: postgres7 error: [-1: ERROR: syntax error at or near ")" LINE 18: ... ) AND artefacttype IN('file') AND filetype IN () ORDER BY... ^] in EXECUTE("SELECT a.* FROM "artefact" a JOIN "artefact_file_files" ON "artefact_file_files".artefact = a.id LEFT OUTER JOIN "artefact_access_usr" aau ON (a.id = aau.artefact AND aau.usr = 1) LEFT OUTER JOIN "artefact_parent_cache" apc ON (a.id = apc.artefact) LEFT OUTER JOIN ( SELECT aar.artefact, aar.can_republish, m.group FROM "artefact_access_role" aar INNER JOIN "group_member" m ON aar.role = m.role WHERE m.member = 1 AND aar.can_republish = 1 ) ra ON (a.id = ra.artefact AND a.group = ra.group) WHERE ( owner = 1 OR ra.can_republish = 1 OR aau.can_republish = 1 OR a.institution IN ('mahara') ) AND artefacttype IN('file') AND filetype IN () ORDER BY title LIMIT 5") Command was: SELECT a.* FROM "artefact" a JOIN "artefact_file_files" ON "artefact_file_files".artefact = a.id LEFT OUTER JOIN "artefact_access_usr" aau ON (a.id = aau.artefact AND aau.usr = 1) LEFT OUTER JOIN "artefact_parent_cache" apc ON (a.id = apc.artefact) LEFT OUTER JOIN ( SELECT aar.artefact, aar.can_republish, m.group FROM "artefact_access_role" aar INNER JOIN "group_member" m ON aar.role = m.role WHERE m.member = 1 AND aar.can_republish = 1 ) ra ON (a.id = ra.artefact AND a.group = ra.group) WHERE ( owner = 1 OR ra.can_republish = 1 OR aau.can_republish = 1 OR a.institution IN ('mahara') ) AND artefacttype IN('file') AND filetype IN () ORDER BY title 

Wouldn't it be better to check first whether a filetype is selected at all in the above mentioned "blocktype" admin section. If no(!) file type is selected -> don't show the blocktype "Embedded Media"

In this context it would also be very useful that the admin could administer the blocktypes itself. So, for instance to disallow blocktypes of type "External Video" for instance, cause external content is hard to monitor e.g. with regard to objectionable material.  

 

--  In section "Plugin Administration" / "Plugin type: artefact" / "file" / "file (Config)" the administration of the file types for the artrefacts isn't given anymore. It is only possible to set "Default Quota" and the "Profile Icon Size".

 

BR, Peer 

anonymous profile picture
Account deleted
Posts: 808

12 June 2009, 18:41

Heh, yes we should fix that one and not try to run the query when there are no allowed filetypes.

In 1.2 you can disable most plugins (including all the block types) in the admin section, so there will be a better solution than just unchecking all the file types.

We deliberately removed the ability to deny uploads based on mime type (in 1.1.0 I think).  Mahara used to try to detect mimetypes on upload using 'file', but that turned out to be too unreliable.  So now it just believes the mimetype given by the browser. Then when serving the files we either filter html, or force the user to download and save the file.

2 results