-
Bug
-
Resolution: Fixed
-
Minor
-
2.4.3
-
MOODLE_24_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MDL-39422-master -
At our University there are some lecturer who add resources with Names longer than 255 chars.
The URL is: https://mymoodle..../course/modedit.php?add=resource&type=&course=123§ion=1&return=0&sr=0
Now my request is: Is it possible to change <input size="48" name="name" type="text" onblur="validate_mod_resource_mod_form_name(this)" onchange="validate_mod_resource_mod_form_name(this)" id="id_name">
to something like
<input size="48" maxlengt="255" name="name" type="text" onblur="validate_mod_resource_mod_form_name(this)" onchange="validate_mod_resource_mod_form_name(this)" id="id_name">
If the names length is longer as 255 chars thereĀ“s follogwing error shown:
Debug info: ERROR: value too long for type character varying(255)
INSERT INTO mdl_resource (name,display,filterfiles,course,revision,intro,introformat,timemodified,displayoptions) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9) RETURNING id
[array (
'name' => 'bjjbjdsbvjdsbvjdsbvjdsbvjkdsbvjdvbsdkvbdjsvbjdvbsdjvbjsdbvjkdbvjdsbvjdsbvkjsdbvjdsbvksjdbvsdkvbjdsbvjdsvbjssdvjdsvjsdbvjdsbvsbbdjvbjsdbvjbdsjvbdsjbvkdsdjvbdjsbdjsbdvkbjvjskjdbvjksdjbvksdvdjsbkjbjvjsbkdjbvjskjdbjvsjkjdbvsjdkjbvvvvvvvvvvvvvvvvvvvvvjddddddddddddddddddddddddddddddddddddddddddddddskkkkkkkkkkkkkkkkkkkkkkkkskskskskskskskksskkkskdbjdbcbscdbscjbcjksbcsdjbckjbcksdcbjdcbkjsbdjbcksjbdcksdjbcksjbcjdksjdbcjskdjbcjbsjdbcskcbkjbkjsbcjcbsjcbsjcbkjcbsdckjbscjbscsjb',
'display' => '5',
'filterfiles' => '0',
'course' => '648',
'revision' => 1,
'intro' => '',
'introformat' => '1',
'timemodified' => 1367309963,
'displayoptions' => 'a:2:
',
)]
Error code: dmlwriteexception
Stack trace:
line 429 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 857 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 909 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
line 97 of /mod/resource/lib.php: call to pgsql_native_moodle_database->insert_record()
line 449 of /course/modedit.php: call to resource_add_instance()
Thanks,
Benjamin Droemer
Ulm University
- has been marked as being related by
-
MDL-41656 Input fields are limited to 255 characters which limits multiple languages in activity and resource names
- Closed