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

mod_chat duplicate records

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.4.6
    • Fix Version/s: None
    • Component/s: Chat
    • Labels:
    • Affected Branches:
      MOODLE_24_STABLE

      Description

      As described in MDL-29441, mod_chat has a get_records leading to a duplicate user id.

      Looks like when getting chat users we're not being picky enough with our distinct fields.

      I've not seen this every time - saw it this time on 2.4 so it may have been fixed in newer versions already.

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '2' found in column 'id'.•line 780 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()
      •line 515 of /mod/chat/lib.php: call to pgsql_native_moodle_database->get_records_sql()
      •line 1249 of /mod/chat/lib.php: call to chat_get_users()
      •line 2037 of /lib/navigationlib.php: call to chat_extend_navigation()
      •line 1205 of /lib/navigationlib.php: call to global_navigation->load_activity()
      •line 3018 of /lib/navigationlib.php: call to global_navigation->initialise()
      •line 766 of /lib/pagelib.php: call to navbar->has_items()
      •line 4 of /theme/base/layout/general.php: call to moodle_page->has_navbar()
      •line 810 of /lib/outputrenderers.php: call to include()
      •line 740 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      •line ? of unknownfile: call to core_renderer->header()
      •line 1460 of /lib/setuplib.php: call to call_user_func_array()
      •line 93 of /mod/chat/view.php: call to bootstrap_renderer->__call()
      •line 93 of /mod/chat/view.php: call to bootstrap_renderer->header()
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: