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

Error generated when entering a tag '4.2'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.9
    • Tags
    • None
    • PostgreSQL
    • MOODLE_19_STABLE

      This error was generated while trying to add a new 'interest' tag to a user's profile. The tag was deliberately entered as a float (to see what would happen).

      ERROR: invalid input syntax for integer: " 4.2"

      SELECT name FROM mdl_tag WHERE id = ' 4.2'

      • line 684 of lib/dmllib.php: call to debugging()
      • line 481 of lib/dmllib.php: call to get_recordset_sql()
      • line 421 of lib/dmllib.php: call to get_record_sql()
      • line 179 of tag/lib.php: call to get_record()
      • line 323 of tag/lib.php: call to tag_name()
      • line 457 of tag/lib.php: call to tag_name_from_string()
      • line 58 of user/editlib.php: call to update_item_tags()
      • line 111 of user/edit.php: call to useredit_update_interests()

      This error is trivial in as much as the tag is not stored, and clicking on the continue button is available and works.

      I expect that it is not possible to have tag names that are integers or floats, because the use of $tag_names_or_ids_cvs (a tag named with a number will be mistaken for an id passed here).

      May I suggest a bit of javascript on the input fields for any tag entry that would inform the user that they has entered an illegal tag name, or a help button that explains the situation.

            scyrma Mathieu Petit-Clair
            jb23347 John Beedell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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