Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72937

Saving a user profile Moodlenet field > 255 characters causes exception

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • Hide

      To create a 256 character string use the Lorem Ipsum generator at https://www.lipsum.com/

      1. Log in as admin
      2. Navigate to Advanced features in site administration
      3. Ensure Enable MoodleNet integration is ticked and save changes
      4. Edit your profile
      5. Paste your 256 character string into the MoodleNet profile field
      6. Confirm only the first 255 characters are present in the field (if using Lorem Ipsum generator above, then it will be everything without the final period)
      7. Press Update profile
      8. Confirm profile was updated without exceptions
      9. Confirm 255 characters you entered in the MoodleNet profile field are displayed
      Show
      To create a 256 character string use the Lorem Ipsum generator at https://www.lipsum.com/ Log in as admin Navigate to Advanced features in site administration Ensure Enable MoodleNet integration is ticked and save changes Edit your profile Paste your 256 character string into the MoodleNet profile field Confirm only the first 255 characters are present in the field (if using Lorem Ipsum generator above, then it will be everything without the final period) Press Update profile Confirm profile was updated without exceptions Confirm 255 characters you entered in the MoodleNet profile field are displayed

      The Description field in the User Profile (mdl_user.moodlenetprofile) has a limit of 255 chars in the database. Yet in Moodle, it is edited with the Atto editor, leading users to believe it is a large text field.

      Trying to save a user profile with > 255 chars in the Description results in the following exception, as there appears to be no validation on length:

      Error writing to database Debug: Data too long for column 'moodlenetprofile' at row 1
      

            pholden Paul Holden
            peedeeboy Pete Whelpton
            Amaia Anabitarte Amaia Anabitarte
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.