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

Unable to reset Dashboard for all users - postgres fails if number of parameters over 65535

XMLWordPrintable

    • MOODLE_30_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-53425-master-delete-by-chunks
    • Hide
      Setup
      1. Edit PHP's memory limit to at least 2048M (just to be sure the generator script that we will run won't crash :s).
      2. Set up a fresh Moodle installation.
      3. Copy the attached files dashboard_generator_cli.php and check_data.php to your Moodle root directory.
      4. Open a terminal and cd to your moodle's root directory.
      5. Execute php check_data.php and take note of the values for my_pages, block_positions, block_instances and block-related user preference records.
      6. Execute php dashboard_generator_cli.php. (This will take a while)
      7. Execute php check_data.php and take note of the values for my_pages, block_positions, block_instances and block-related user preference records.
      Testing proper
      1. Login as admin.
      2. Go to Site administration ► Appearance ► Default Dashboard page
      3. Click Reset Dashboard for all users. (This might also take a while)
        • Confirm that the process finishes normally and without any errors.
      4. Execute php check_data.php and take note of the values for my_pages, block_positions, block_instances and block-related user preference records.
        • Confirm that these are now the same with the values that were retrieved on check_data's first run.
      Show
      Setup Edit PHP's memory limit to at least 2048M (just to be sure the generator script that we will run won't crash :s). Set up a fresh Moodle installation. Copy the attached files dashboard_generator_cli.php and check_data.php to your Moodle root directory. Open a terminal and cd to your moodle's root directory. Execute php check_data.php and take note of the values for my_pages, block_positions, block_instances and block-related user preference records. Execute php dashboard_generator_cli.php . (This will take a while) Execute php check_data.php and take note of the values for my_pages, block_positions, block_instances and block-related user preference records. Testing proper Login as admin. Go to Site administration ► Appearance ► Default Dashboard page Click Reset Dashboard for all users . (This might also take a while) Confirm that the process finishes normally and without any errors. Execute php check_data.php and take note of the values for my_pages, block_positions, block_instances and block-related user preference records. Confirm that these are now the same with the values that were retrieved on check_data's first run.
    • 3.1 Sprint 7, 3.2 Sprint 1
    • Large

      Whenever I try to reset Dashboard for all users I got this error message:

      -------------------
      Debug info: number of parameters must be between 0 and 65535
      DELETE FROM mdl_user_preferences WHERE name IN ($1,$2,$3,$4,$5,$6,$7,
      ...
      76243 => 'docked_block_instance_44065',
      76244 => 'block44066hidden',
      76245 => 'docked_block_instance_44066',
      )]
      Error code: dmlwriteexception
      -------------------

      Stack trace:

      line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 1287 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 1847 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->delete_records_select()
      line 2078 of /lib/blocklib.php: call to moodle_database->delete_records_list()
      line 177 of /my/lib.php: call to blocks_delete_instances()
      line 52 of /my/indexsys.php: call to my_reset_page_for_all_users()

        1. check_data.php
          0.6 kB
          Jun Pataleta
        2. dashboard_generator_cli.php
          3 kB
          Jun Pataleta

            jpataleta Jun Pataleta
            caiado Ricardo Caiado
            Ryan Wyllie Ryan Wyllie
            David Monllaó David Monllaó
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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