Moodle

`mdl_shb_user`.`lang` is with varchar 10 too short for individual UTF-8 langnames

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.3, 1.7
  • Fix Version/s: 1.8
  • Component/s: Database SQL/XMLDB
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_16_STABLE, MOODLE_17_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

Since UTF-8 language names have already 7 characters varchar 10 is a bit short for individual UTF-8 language names.

After a long trouble shooting why language changes did not work as expected I noticed, that the individual language name "de_shb_utf8" gets truncated in the database

Please add the now missing 5 characters (_utf8) to the lang field to give more flexibility back.

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Hi Urs,

this has been addressed to 1.8. There, such fields will be incremented upto 30cc.

Now we are in Beta stage and must avoid DB changes completely.

Until them you can:

  • reduce the lang name or
  • increase user->lang and course->lang up to 30cc

Sorry by the delay, but we must not do it before 1.8

Show
Eloy Lafuente (stronk7) added a comment - Hi Urs, this has been addressed to 1.8. There, such fields will be incremented upto 30cc. Now we are in Beta stage and must avoid DB changes completely. Until them you can:
  • reduce the lang name or
  • increase user->lang and course->lang up to 30cc
Sorry by the delay, but we must not do it before 1.8
Hide
Urs Hunkler added a comment -

Eloy, we investigated into a concept how we can use that short names without loosing all meaning. We managed it

I thought about changing the field length in the db but decided against the change because I did not know if future db upgrades would break. Or normal incremental updates could cause a problem.

Is it ok to set the two fields to varchar 30 without future problems?

Show
Urs Hunkler added a comment - Eloy, we investigated into a concept how we can use that short names without loosing all meaning. We managed it I thought about changing the field length in the db but decided against the change because I did not know if future db upgrades would break. Or normal incremental updates could cause a problem. Is it ok to set the two fields to varchar 30 without future problems?
Hide
Eloy Lafuente (stronk7) added a comment -

Hi Urs,

if you can shorter the names to fit the 10cc. better, indeed.

But if finally you decide to increase DB fields length, I really think it won't be a problem at all when the standard upgrade "reconvert" them again from 30 to 30 (i.e. nothing).

Ciao

P.S.: After 1.7 release (coming soon) I'll try to fix this under 1.8 and we'll test it against some DB where the "manual change" had been performed, but I'm pretty sure it won't affect anything.

Show
Eloy Lafuente (stronk7) added a comment - Hi Urs, if you can shorter the names to fit the 10cc. better, indeed. But if finally you decide to increase DB fields length, I really think it won't be a problem at all when the standard upgrade "reconvert" them again from 30 to 30 (i.e. nothing). Ciao P.S.: After 1.7 release (coming soon) I'll try to fix this under 1.8 and we'll test it against some DB where the "manual change" had been performed, but I'm pretty sure it won't affect anything.
Hide
Eloy Lafuente (stronk7) added a comment -

4 "lang" fields have been found. Subtasking for each one.... work in progress....

Show
Eloy Lafuente (stronk7) added a comment - 4 "lang" fields have been found. Subtasking for each one.... work in progress....
Hide
Eloy Lafuente (stronk7) added a comment -

Done. Now all the 4 lang fields in Moodle DB are char(30).

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Done. Now all the 4 lang fields in Moodle DB are char(30). Ciao

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: