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

Error shown when an update is available in an contributed plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • None
    • 2.3
    • Administration
    • MOODLE_23_STABLE

      I was testing the update notification functionality. After fiddling with version numbers, Eloy was able to force an update of download.mooodle.org so that it was in synch with moodle.org/plugins. But when I received the update results, it produced the following error, which broke the page.

      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error
       
      More information about this error
      Debug info: Argument 2 passed to available_update_info::__construct() must be an array, string given, called in D:\xampp\htdocs\moodle_master\lib\pluginlib.php on line 708 and defined
      Error code: codingerror
      Stack trace:
       
          line 397 of \lib\setuplib.php: coding_exception thrown
          line 1357 of \lib\pluginlib.php: call to default_error_handler()
          line 708 of \lib\pluginlib.php: call to available_update_info->__construct()
          line 1679 of \lib\pluginlib.php: call to available_update_checker->get_update_info()
          line 127 of \lib\pluginlib.php: call to plugininfo_base->check_available_updates()
          line 789 of \admin\renderer.php: call to plugin_manager->get_plugins()
          line 269 of \admin\renderer.php: call to core_admin_renderer->plugins_overview_panel()
          line 46 of \admin\plugins.php: call to core_admin_renderer->plugin_management_page()

      This seems to be a problem on the client side. Eloy was able to confirm the report from the server is being processed properly...

      http://download.moodle.org/api/1.0/updates.php?branch=2.3&version=2012060101&plugins=block_simple_clock@2011051200

      {"status":"OK","provider":"http:\/\/download.moodle.org\/api\/1.0\/updates.php","apiver":"1.0","timegenerated":1339402973,"ticket":"JUM5JTkxMyVBQyUzQSU4NCU3RnklRUIlQzYlRDglRDclQjFmJTEyJUU2SiU5RSU5QyVBQVRuJUM5cCUyQyVCQiVGOCUxOGYlQUQlMkJYJThGJTEzJTFCJTg1JTdCJThDJTg5TA==","forbranch":"2.3","forversion":"2012060101","updates":{"block_simple_clock":{"version":"2012061100","release":"Version for Moodle 2.x","maturity":200}}}

      I tried this again with another plugin and it produced the same results.

      Replication steps:

      1. Navigate to Admin settings > Server > Update notifications
      2. Lower the Required code maturity (I used Beta, this just allowed me to try this with more plugins)
      3. Check "Notify about new builds"
      4. Download a contributed plugin that is available for 2.3 (Try the Simple Clock or Accessibility blocks)
      5. Backdate the plugin in its version.php file
      6. Install the plugin
      7. Navigate to Site admin > Plugins > Plugins overview
      8. Click the button labelled "Check for available updates"

        1. screenshot-1.jpg
          45 kB
          David Mudrák (@mudrd8mz)

            stronk7 Eloy Lafuente (stronk7)
            salvetore Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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