-
New Feature
-
Resolution: Duplicate
-
Minor
-
None
-
3.4.2
-
None
-
MOODLE_34_STABLE
Documents with names of more than 90 characters, including spaces and the file extension fail to download. A student is able to upload a document with a name of more than 90 characters, but when a teacher attempts to open the file, they receive the following error:
Exception - Call to undefined function get_mimetypes_array()
Debug info:
Error code: generalexceptionmessage
Stack trace: •line 999 of \lib\moodlelib.php: Error thrown
•line 1022 of \lib\moodlelib.php: call to clean_param()
•line 1001 of \lib\setuplib.php: call to clean_param()
•line 839 of \lib\setuplib.php: call to setup_get_remote_url()
•line 734 of \lib\setup.php: call to initialise_fullme()
•line 39 of \config.php: call to require_once()
•line 30 of \pluginfile.php: call to require_once()
Steps to replicate:
- In a course with at least one student and teacher, create an assignment.
- As the student, create a MS word document (.docx file). Save the file with a name consisting of more that 90 characters (this can include spaces and the file extension). Upload the document to the assignment.
- As the teacher, navigate to the assignment > View all submissions > click on the file name under File submission to either open or download the file. You should receive the error above if Developer debugging is enabled.
The environment this was tested in was Moodle 3.4.2, MS Windows Server 2016, SQL Server 2014, PHP 7.1
- duplicates
-
MDL-61724 Unable to download resources of type "File" with name of 90+ bytes
-
- Closed
-