Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3858

Hotpot upgrade fails when running via CLI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.3
    • Module: HotPot
    • None
    • MOODLE_23_STABLE

      Hi Gordon - FYI upgrading your hotpot module in Moodle 2.3 fails when upgrading if the admin user isn't logged in. - it works ok when logged in as admin. (found this while running CLI upgrade but can be reproduced using standard web upgrade when not logged in)

      it gives this error:
      -->mod_hotpot
      Default exception handler: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error Debug: Argument 2 passed to has_capability() must be an instance of context, boolean given, called in /var/www/theloop-testing-moodle/releases/20120815020126/mod/hotpot/lib.php on line 1628 and defined
      Error code: codingerror

      • line 397 of /lib/setuplib.php: coding_exception thrown
      • line 355 of /lib/accesslib.php: call to default_error_handler()
      • line 1628 of /mod/hotpot/lib.php: call to has_capability()
      • line 1584 of /mod/hotpot/lib.php: call to hotpot_update_events()
      • line 626 of /mod/hotpot/db/upgrade.php: call to hotpot_refresh_events()
      • line 627 of /lib/upgradelib.php: call to xmldb_hotpot_upgrade()
      • line 358 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      • line 1524 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 159 of /admin/cli/upgrade.php: call to upgrade_noncore()
        !!! Coding error detected, it must be fixed by a programmer: PHP catchable fatal error !!!
        !! Argument 2 passed to has_capability() must be an instance of context, boolean given, called in /var/www/theloop-testing-moodle/releases/20120815020126/mod/hotpot/lib.php on line 1628 and defined
        Error code: codingerror !!
        !! Stack trace: * line 397 of /lib/setuplib.php: coding_exception thrown
      • line 355 of /lib/accesslib.php: call to default_error_handler()
      • line 1628 of /mod/hotpot/lib.php: call to has_capability()
      • line 1584 of /mod/hotpot/lib.php: call to hotpot_update_events()
      • line 626 of /mod/hotpot/db/upgrade.php: call to hotpot_refresh_events()
      • line 627 of /lib/upgradelib.php: call to xmldb_hotpot_upgrade()
      • line 358 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      • line 1524 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 159 of /admin/cli/upgrade.php: call to upgrade_noncore()
        !!

      once getting this error you can just login as admin and it allows the upgrade to continue.

      thanks,

      Dan

            xxxxxxx Gordon Bateson
            danmarsden Dan Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

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